mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Implement gomatrixserverlib.HeaderedEvent in roomserver query API (#912)
* Implement gomatrixserverlib.HeaderedEvent, which should allow us to store room version headers along with the event across API boundaries and consumers/producers, and intercept unmarshalling to get the event structure right * Add federationsender to previous
This commit is contained in:
parent
452f393dd7
commit
acb505b717
21 changed files with 163 additions and 36 deletions
|
@ -68,8 +68,8 @@ func GetMissingEvents(
|
|||
|
||||
// filterEvents returns only those events with matching roomID and having depth greater than minDepth
|
||||
func filterEvents(
|
||||
events []gomatrixserverlib.Event, minDepth int64, roomID string,
|
||||
) []gomatrixserverlib.Event {
|
||||
events []gomatrixserverlib.HeaderedEvent, minDepth int64, roomID string,
|
||||
) []gomatrixserverlib.HeaderedEvent {
|
||||
ref := events[:0]
|
||||
for _, ev := range events {
|
||||
if ev.Depth() >= minDepth && ev.RoomID() == roomID {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue