From fe95f2217cba3390c367d2bc429abd8f829987d2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 18 Feb 2016 10:26:24 +0000 Subject: [PATCH] Add stuff pulled from the DB to the cache --- synapse/handlers/presence.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 4b3d03745..8831d83c5 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)