mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 00:33:50 +01:00
Comments
This commit is contained in:
parent
6308ac45b0
commit
2be8a281d2
2 changed files with 10 additions and 9 deletions
|
@ -55,17 +55,17 @@ class FederationRemoteSendQueue(object):
|
|||
self.notifier = hs.get_notifier()
|
||||
self.is_mine_id = hs.is_mine_id
|
||||
|
||||
self.presence_map = {}
|
||||
self.presence_changed = sorteddict()
|
||||
self.presence_map = {} # Pending presence map user_id -> UserPresenceState
|
||||
self.presence_changed = sorteddict() # Stream position -> user_id
|
||||
|
||||
self.keyed_edu = {}
|
||||
self.keyed_edu_changed = sorteddict()
|
||||
self.keyed_edu = {} # (destination, key) -> EDU
|
||||
self.keyed_edu_changed = sorteddict() # stream position -> (destination, key)
|
||||
|
||||
self.edus = sorteddict()
|
||||
self.edus = sorteddict() # stream position -> Edu
|
||||
|
||||
self.failures = sorteddict()
|
||||
self.failures = sorteddict() # stream position -> (destination, Failure)
|
||||
|
||||
self.device_messages = sorteddict()
|
||||
self.device_messages = sorteddict() # stream position -> destination
|
||||
|
||||
self.pos = 1
|
||||
self.pos_time = sorteddict()
|
||||
|
|
|
@ -666,7 +666,7 @@ class PresenceHandler(object):
|
|||
"""Sends state updates to remote servers.
|
||||
|
||||
Args:
|
||||
hosts_to_states (list): list(state)
|
||||
hosts_to_states (list(UserPresenceState))
|
||||
"""
|
||||
self.federation.send_presence(states)
|
||||
|
||||
|
@ -1332,6 +1332,8 @@ def get_interested_remotes(store, states):
|
|||
each row the list of UserPresenceState should be sent to each
|
||||
destination
|
||||
"""
|
||||
hosts_and_states = [] # Final result to return
|
||||
|
||||
# First we look up the rooms each user is in (as well as any explicit
|
||||
# subscriptions), then for each distinct room we look up the remote
|
||||
# hosts in those rooms.
|
||||
|
@ -1348,7 +1350,6 @@ def get_interested_remotes(store, states):
|
|||
for u in plist:
|
||||
users_to_states.setdefault(u, []).append(state)
|
||||
|
||||
hosts_and_states = []
|
||||
for room_id, states in room_ids_to_states.items():
|
||||
if not local_states:
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue