Skip to content

Commit

Permalink
Fix bridged Matrix message timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 31, 2023
1 parent 4b7fda2 commit bdb3258
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ func (portal *Portal) handleSignalTextMessage(ctx context.Context, portalMessage
msg := (portalMessage.message).(signalmeow.IncomingSignalMessageText)
content := signalfmt.Parse(msg.Content, msg.ContentRanges, signalFormatParams)
portal.addSignalQuote(ctx, content, msg.Quote)
resp, err := portal.sendMatrixMessage(intent, event.EventMessage, content, nil, 0)
resp, err := portal.sendMatrixMessage(intent, event.EventMessage, content, nil, int64(timestamp))
if err != nil {
return err
}
Expand Down Expand Up @@ -1139,7 +1139,7 @@ func (portal *Portal) handleSignalStickerMessage(ctx context.Context, portalMess
portal.log.Error().Err(err).Msg("Failed to upload media")
}

resp, err := portal.sendMatrixMessage(intent, event.EventSticker, content, nil, 0)
resp, err := portal.sendMatrixMessage(intent, event.EventSticker, content, nil, int64(timestamp))
if err != nil {
return err
}
Expand Down Expand Up @@ -1433,7 +1433,7 @@ func (portal *Portal) handleSignalAttachmentMessage(ctx context.Context, portalM
portal.log.Error().Err(err).Msg(failureMessage)
portal.MainIntent().SendNotice(portal.MXID, failureMessage)
}
resp, err := portal.sendMatrixMessage(intent, event.EventMessage, content, nil, 0)
resp, err := portal.sendMatrixMessage(intent, event.EventMessage, content, nil, int64(timestamp))
if err != nil {
return err
}
Expand Down

0 comments on commit bdb3258

Please sign in to comment.