mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 10:39:22 -05:00
Comment
This commit is contained in:
parent
414522aed5
commit
a8c8e4efd4
@ -191,9 +191,15 @@ class FederationRemoteSendQueue(object):
|
||||
self.notifier.on_new_replication_data()
|
||||
|
||||
def send_presence(self, states):
|
||||
"""As per TransactionQueue"""
|
||||
"""As per TransactionQueue
|
||||
|
||||
Args:
|
||||
states (list(UserPresenceState))
|
||||
"""
|
||||
pos = self._next_pos()
|
||||
|
||||
# We only want to send presence for our own users, so lets always just
|
||||
# filter here just in case.
|
||||
local_states = filter(lambda s: self.is_mine_id(s.user_id), states)
|
||||
|
||||
self.presence_map.update({state.user_id: state for state in local_states})
|
||||
|
@ -251,6 +251,8 @@ class TransactionQueue(object):
|
||||
|
||||
# First we queue up the new presence by user ID, so multiple presence
|
||||
# updates in quick successtion are correctly handled
|
||||
# We only want to send presence for our own users, so lets always just
|
||||
# filter here just in case.
|
||||
self.pending_presence.update({
|
||||
state.user_id: state for state in states
|
||||
if self.is_mine_id(state.user_id)
|
||||
|
Loading…
Reference in New Issue
Block a user