mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 17:50:21 +00:00
Handle get_all_entities_changed returning None
This commit is contained in:
parent
6e0209112b
commit
13f86c3489
1 changed files with 3 additions and 0 deletions
|
@ -858,11 +858,14 @@ class PresenceEventSource(object):
|
||||||
friends.add(user_id) # So that we receive our own presence
|
friends.add(user_id) # So that we receive our own presence
|
||||||
|
|
||||||
user_ids_changed = set()
|
user_ids_changed = set()
|
||||||
|
changed = None
|
||||||
if from_key and from_key < 100:
|
if from_key and from_key < 100:
|
||||||
# For small deltas, its quicker to get all changes and then
|
# For small deltas, its quicker to get all changes and then
|
||||||
# work out if we share a room or they're in our presence list
|
# work out if we share a room or they're in our presence list
|
||||||
changed = stream_change_cache.get_all_entities_changed(from_key)
|
changed = stream_change_cache.get_all_entities_changed(from_key)
|
||||||
|
|
||||||
|
# get_all_entities_changed can return None
|
||||||
|
if changed is not None:
|
||||||
for other_user_id in changed:
|
for other_user_id in changed:
|
||||||
if other_user_id in friends:
|
if other_user_id in friends:
|
||||||
user_ids_changed.add(other_user_id)
|
user_ids_changed.add(other_user_id)
|
||||||
|
|
Loading…
Reference in a new issue