Skip to content

Commit

Permalink
Add double puppet value to reaction content
Browse files Browse the repository at this point in the history
  • Loading branch information
javiercr committed May 31, 2024
1 parent 9557be1 commit d4445bf
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d4445bf

Please sign in to comment.