Send tombstone messages as bridge bot

This commit is contained in:
Tulir Asokan 2023-08-08 23:18:00 +03:00
parent f9d004a09d
commit aa28b6bd38

View file

@ -593,10 +593,18 @@ func (portal *Portal) convertGoogleMessage(ctx context.Context, source *User, ev
cm.SenderID = evt.ParticipantID
cm.ID = evt.MessageID
cm.Timestamp = time.UnixMicro(evt.Timestamp)
msgStatus := evt.GetMessageStatus().GetStatus()
if msgStatus >= 200 && msgStatus < 300 {
cm.Intent = portal.bridge.Bot
if !portal.Encrypted && portal.IsPrivateChat() {
cm.Intent = portal.MainIntent()
}
} else {
cm.Intent = portal.getIntent(ctx, source, evt.ParticipantID)
if cm.Intent == nil {
return nil
}
}
var replyTo id.EventID
if evt.GetReplyMessage() != nil {