summary refs log tree commit diff
path: root/synapse/storage/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-08 15:16:16 +0000
committerErik Johnston <erik@matrix.org>2016-02-08 15:16:16 +0000
commit2bb5f035affda14742ab715033570616621c0000 (patch)
tree9348a7051ebb1d264afa47b2ce2d87c8b19f5523 /synapse/storage/presence.py
parentMerge pull request #562 from matrix-org/erikj/push_metric (diff)
parentFix up logcontexts (diff)
downloadsynapse-2bb5f035affda14742ab715033570616621c0000.tar.xz
Merge pull request #564 from matrix-org/erikj/logcontext
Fix up logcontexts
Diffstat (limited to 'synapse/storage/presence.py')
-rw-r--r--synapse/storage/presence.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py
index 9b3aecaf8c..ef525f34c5 100644
--- a/synapse/storage/presence.py
+++ b/synapse/storage/presence.py
@@ -68,8 +68,9 @@ class PresenceStore(SQLBaseStore):
             for row in rows
         })
 
+    @defer.inlineCallbacks
     def set_presence_state(self, user_localpart, new_state):
-        res = self._simple_update_one(
+        res = yield self._simple_update_one(
             table="presence",
             keyvalues={"user_id": user_localpart},
             updatevalues={"state": new_state["state"],
@@ -79,7 +80,7 @@ class PresenceStore(SQLBaseStore):
         )
 
         self.get_presence_state.invalidate((user_localpart,))
-        return res
+        defer.returnValue(res)
 
     def allow_presence_visible(self, observed_localpart, observer_userid):
         return self._simple_insert(