diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-23 15:05:37 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-23 15:05:37 +0000 |
commit | 13f86c3489dba5a2df06cf635f220c23e36b662a (patch) | |
tree | 5c4194797887847730d21eb7b8bcc1c35781145f /synapse/handlers | |
parent | Add comments (diff) | |
download | synapse-13f86c3489dba5a2df06cf635f220c23e36b662a.tar.xz |
Handle get_all_entities_changed returning None
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/presence.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index ff62d47679..952e48e319 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -858,11 +858,14 @@ class PresenceEventSource(object): friends.add(user_id) # So that we receive our own presence user_ids_changed = set() + changed = None if from_key and from_key < 100: # 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 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: if other_user_id in friends: user_ids_changed.add(other_user_id) |