mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-03 12:13:09 -06:00
Add the initial event into the set
This commit is contained in:
parent
74baae0669
commit
5d9fd35ee9
|
|
@ -161,7 +161,12 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent(
|
||||||
// in the sync API database or we'll need to ask the roomserver.
|
// in the sync API database or we'll need to ask the roomserver.
|
||||||
knownEventIDs := make(map[string]bool, len(msg.AddsStateEventIDs))
|
knownEventIDs := make(map[string]bool, len(msg.AddsStateEventIDs))
|
||||||
for _, eventID := range msg.AddsStateEventIDs {
|
for _, eventID := range msg.AddsStateEventIDs {
|
||||||
knownEventIDs[eventID] = eventID == ev.EventID()
|
if eventID == ev.EventID() {
|
||||||
|
knownEventIDs[eventID] = true
|
||||||
|
addsStateEvents = append(addsStateEvents, ev)
|
||||||
|
} else {
|
||||||
|
knownEventIDs[eventID] = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Work out which events we want to look up in the sync API database.
|
// Work out which events we want to look up in the sync API database.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue