mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-08 18:16:59 +00:00
Tweak removeDuplicates
calls to use events
instead of recentEvents
(#2853)
... since `events` is *after* history visibility filtering, not before it.
This commit is contained in:
parent
1fcbb9b5e5
commit
8704e84898
@ -316,7 +316,7 @@ func (p *PDUStreamProvider) addRoomDeltaToResponse(
|
||||
// left. Anything that appears in the filtered timeline will be removed from the
|
||||
// "state" section and kept in "timeline".
|
||||
delta.StateEvents = gomatrixserverlib.HeaderedReverseTopologicalOrdering(
|
||||
removeDuplicates(delta.StateEvents, recentEvents),
|
||||
removeDuplicates(delta.StateEvents, events),
|
||||
gomatrixserverlib.TopologicalOrderByAuthEvents,
|
||||
)
|
||||
|
||||
@ -530,7 +530,7 @@ func (p *PDUStreamProvider) getJoinResponseForCompleteSync(
|
||||
// If we are limited by the filter AND the history visibility filter
|
||||
// didn't "remove" events, return that the response is limited.
|
||||
limited = limited && len(events) == len(recentEvents)
|
||||
stateEvents = removeDuplicates(stateEvents, recentEvents)
|
||||
stateEvents = removeDuplicates(stateEvents, events)
|
||||
if stateFilter.LazyLoadMembers {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user