From 1a14311ae6f4404b7da94d50e6baf500a4db3a39 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 21 Aug 2023 09:51:48 +0300 Subject: [PATCH] Use SendMessageEvent to ensure reactions get double puppet identifiers --- portal.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/portal.go b/portal.go index 12031a4..22f9f38 100644 --- a/portal.go +++ b/portal.go @@ -692,7 +692,13 @@ func (portal *Portal) syncReactions(ctx context.Context, source *User, message * continue } 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 { log.Err(err).Str("reaction_sender_id", participant).Msg("Failed to send reaction") continue