From d4445bfd7d9bdf84814ea0b8ab7ff2225d2cd05d Mon Sep 17 00:00:00 2001 From: Javier Cuevas Date: Fri, 31 May 2024 13:46:11 +0200 Subject: [PATCH] Add double puppet value to reaction content --- backfill.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/backfill.go b/backfill.go index cd56396..359c737 100644 --- a/backfill.go +++ b/backfill.go @@ -536,20 +536,22 @@ func (portal *Portal) convertAndSendBackfill(ctx context.Context, source *User, reactionTargetEventID := portal.deterministicEventID(msg.MessageId, 0) for _, react := range msg.Reactions { reactSender := portal.bridge.GetPuppetByID(react.ActorId) + reactContent := &event.Content{ + Parsed: &event.ReactionEventContent{ + RelatesTo: event.RelatesTo{ + Type: event.RelAnnotation, + EventID: reactionTargetEventID, + Key: variationselector.Add(react.Reaction), + }, + }, + } + reactSender.IntentFor(portal).AddDoublePuppetValue(reactContent) events = append(events, &event.Event{ Sender: reactSender.IntentFor(portal).UserID, Type: event.EventReaction, Timestamp: react.TimestampMs, RoomID: portal.MXID, - Content: event.Content{ - Parsed: &event.ReactionEventContent{ - RelatesTo: event.RelatesTo{ - Type: event.RelAnnotation, - EventID: reactionTargetEventID, - Key: variationselector.Add(react.Reaction), - }, - }, - }, + Content: *reactContent, }) metas = append(metas, &BackfillPartMetadata{ MessageID: msg.MessageId,