Avoid doing presence updates on replication reconnect
Presence is supposed to be disabled on matrix.org, so we shouldn't send a load of USER_SYNC commands every time the synchrotron reconnects to the master.pull/3476/head
parent
fae708c0e8
commit
1031bd25f8
|
@ -214,6 +214,8 @@ class SynchrotronPresence(object):
|
||||||
yield self.notify_from_replication(states, stream_id)
|
yield self.notify_from_replication(states, stream_id)
|
||||||
|
|
||||||
def get_currently_syncing_users(self):
|
def get_currently_syncing_users(self):
|
||||||
|
# presence is disabled on matrix.org, so we return the empty set
|
||||||
|
return set()
|
||||||
return [
|
return [
|
||||||
user_id for user_id, count in iteritems(self.user_to_num_current_syncs)
|
user_id for user_id, count in iteritems(self.user_to_num_current_syncs)
|
||||||
if count > 0
|
if count > 0
|
||||||
|
|
|
@ -467,6 +467,7 @@ class PresenceHandler(object):
|
||||||
Returns:
|
Returns:
|
||||||
set(str): A set of user_id strings.
|
set(str): A set of user_id strings.
|
||||||
"""
|
"""
|
||||||
|
# presence is disabled on matrix.org, so we return the empty set
|
||||||
return set()
|
return set()
|
||||||
syncing_user_ids = {
|
syncing_user_ids = {
|
||||||
user_id for user_id, count in self.user_to_num_current_syncs.items()
|
user_id for user_id, count in self.user_to_num_current_syncs.items()
|
||||||
|
|
Loading…
Reference in New Issue