Send tombstone messages as bridge bot
This commit is contained in:
parent
f9d004a09d
commit
aa28b6bd38
1 changed files with 11 additions and 3 deletions
|
@ -593,10 +593,18 @@ func (portal *Portal) convertGoogleMessage(ctx context.Context, source *User, ev
|
||||||
cm.SenderID = evt.ParticipantID
|
cm.SenderID = evt.ParticipantID
|
||||||
cm.ID = evt.MessageID
|
cm.ID = evt.MessageID
|
||||||
cm.Timestamp = time.UnixMicro(evt.Timestamp)
|
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)
|
cm.Intent = portal.getIntent(ctx, source, evt.ParticipantID)
|
||||||
if cm.Intent == nil {
|
if cm.Intent == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var replyTo id.EventID
|
var replyTo id.EventID
|
||||||
if evt.GetReplyMessage() != nil {
|
if evt.GetReplyMessage() != nil {
|
||||||
|
|
Loading…
Reference in a new issue