mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Handle event_format federation in /sync responses (#3192)
This commit is contained in:
parent
11fd2f019b
commit
bb2ab62cbf
16 changed files with 739 additions and 84 deletions
|
@ -144,6 +144,6 @@ func GetEvent(
|
|||
}
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusOK,
|
||||
JSON: synctypes.ToClientEvent(events[0], synctypes.FormatAll, *senderUserID, sk),
|
||||
JSON: synctypes.ToClientEvent(events[0], synctypes.FormatAll, senderUserID.String(), sk, events[0].Unsigned()),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ func Relations(
|
|||
}
|
||||
res.Chunk = append(
|
||||
res.Chunk,
|
||||
synctypes.ToClientEvent(event.PDU, synctypes.FormatAll, sender, sk),
|
||||
synctypes.ToClientEvent(event.PDU, synctypes.FormatAll, sender.String(), sk, event.Unsigned()),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ func Search(req *http.Request, device *api.Device, syncDB storage.Database, fts
|
|||
ProfileInfo: profileInfos,
|
||||
},
|
||||
Rank: eventScore[event.EventID()].Score,
|
||||
Result: synctypes.ToClientEvent(event, synctypes.FormatAll, sender, sk),
|
||||
Result: synctypes.ToClientEvent(event, synctypes.FormatAll, sender.String(), sk, event.Unsigned()),
|
||||
})
|
||||
roomGroup := groups[event.RoomID()]
|
||||
roomGroup.Results = append(roomGroup.Results, event.EventID())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue