mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-20 04:23:09 -06:00
Tweak complete sync too
This commit is contained in:
parent
6c0c369286
commit
b4294d082f
|
|
@ -513,7 +513,6 @@ func (p *PDUStreamProvider) getJoinResponseForCompleteSync(
|
||||||
// transaction IDs for complete syncs, but we do it anyway because Sytest demands it for:
|
// transaction IDs for complete syncs, but we do it anyway because Sytest demands it for:
|
||||||
// "Can sync a room with a message with a transaction id" - which does a complete sync to check.
|
// "Can sync a room with a message with a transaction id" - which does a complete sync to check.
|
||||||
recentEvents := snapshot.StreamEventsToEvents(device, recentStreamEvents)
|
recentEvents := snapshot.StreamEventsToEvents(device, recentStreamEvents)
|
||||||
stateEvents = removeDuplicates(stateEvents, recentEvents)
|
|
||||||
|
|
||||||
events := recentEvents
|
events := recentEvents
|
||||||
// Only apply history visibility checks if the response is for joined rooms
|
// Only apply history visibility checks if the response is for joined rooms
|
||||||
|
|
@ -547,7 +546,9 @@ func (p *PDUStreamProvider) getJoinResponseForCompleteSync(
|
||||||
// If we are limited by the filter AND the history visibility filter
|
// If we are limited by the filter AND the history visibility filter
|
||||||
// didn't "remove" events, return that the response is limited.
|
// didn't "remove" events, return that the response is limited.
|
||||||
jr.Timeline.Limited = limited && len(events) == len(recentEvents)
|
jr.Timeline.Limited = limited && len(events) == len(recentEvents)
|
||||||
jr.State.Events = gomatrixserverlib.HeaderedToClientEvents(stateEvents, gomatrixserverlib.FormatSync)
|
jr.State.Events = gomatrixserverlib.HeaderedToClientEvents(
|
||||||
|
removeDuplicates(stateEvents, recentEvents), gomatrixserverlib.FormatSync,
|
||||||
|
)
|
||||||
return jr, nil
|
return jr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue