Use SendMessageEvent to ensure reactions get double puppet identifiers

This commit is contained in:
Tulir Asokan 2023-08-21 09:51:48 +03:00
parent 87489f11a8
commit 1a14311ae6

View file

@ -692,7 +692,13 @@ func (portal *Portal) syncReactions(ctx context.Context, source *User, message *
continue continue
} }
var resp *mautrix.RespSendEvent var resp *mautrix.RespSendEvent
resp, err = intent.SendReaction(portal.MXID, message.MXID, variationselector.Add(emoji)) resp, err = intent.SendMessageEvent(portal.MXID, event.EventReaction, &event.ReactionEventContent{
RelatesTo: event.RelatesTo{
EventID: message.MXID,
Type: event.RelAnnotation,
Key: variationselector.Add(emoji),
},
})
if err != nil { if err != nil {
log.Err(err).Str("reaction_sender_id", participant).Msg("Failed to send reaction") log.Err(err).Str("reaction_sender_id", participant).Msg("Failed to send reaction")
continue continue