mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-25 19:15:51 +03:00
Faster joins: Omit device list updates from partial state rooms in /sync (#15069)
...when lazy loading of members is not enabled. It's weird to notify a client that another user's device list has changed when the client doesn't think that they share a room. Note that when a room is un-partial stated, device list updates are emitted for every member in that room over /sync. Signed-off-by: Sean Quah <seanq@matrix.org>
This commit is contained in:
parent
cb262713b7
commit
463c19ac36
2 changed files with 6 additions and 0 deletions
1
changelog.d/15069.misc
Normal file
1
changelog.d/15069.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Faster joins: omit device list updates originating from partial state rooms in /sync responses without lazy loading of members enabled.
|
|
@ -1399,6 +1399,11 @@ class SyncHandler:
|
||||||
for room_id, is_partial_state in results.items()
|
for room_id, is_partial_state in results.items()
|
||||||
if is_partial_state
|
if is_partial_state
|
||||||
)
|
)
|
||||||
|
membership_change_events = [
|
||||||
|
event
|
||||||
|
for event in membership_change_events
|
||||||
|
if not results.get(event.room_id, False)
|
||||||
|
]
|
||||||
|
|
||||||
# Incremental eager syncs should additionally include rooms that
|
# Incremental eager syncs should additionally include rooms that
|
||||||
# - we are joined to
|
# - we are joined to
|
||||||
|
|
Loading…
Reference in a new issue