diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-18 10:26:24 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-18 10:26:24 +0000 |
commit | fe95f2217cba3390c367d2bc429abd8f829987d2 (patch) | |
tree | f4bdb79e8b82192061376915c073f4df5c533890 /synapse/handlers/presence.py | |
parent | PEP8 (diff) | |
download | synapse-fe95f2217cba3390c367d2bc429abd8f829987d2.tar.xz |
Add stuff pulled from the DB to the cache
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/presence.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 4b3d037453..8831d83c56 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -443,10 +443,12 @@ class PresenceHandler(BaseHandler): missing = [user_id for user_id, state in states.items() if not state] if missing: - states.update({ + new = { user_id: UserPresenceState.default(user_id) for user_id in missing - }) + } + states.update(new) + self.user_to_current_state.update(new) defer.returnValue(states) |