summary refs log tree commit diff
path: root/synapse/handlers/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-18 10:26:24 +0000
committerErik Johnston <erik@matrix.org>2016-02-18 10:26:24 +0000
commitfe95f2217cba3390c367d2bc429abd8f829987d2 (patch)
treef4bdb79e8b82192061376915c073f4df5c533890 /synapse/handlers/presence.py
parentPEP8 (diff)
downloadsynapse-fe95f2217cba3390c367d2bc429abd8f829987d2.tar.xz
Add stuff pulled from the DB to the cache
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r--synapse/handlers/presence.py6
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)