summary refs log tree commit diff
path: root/synapse/storage/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-04 10:22:44 +0000
committerErik Johnston <erik@matrix.org>2016-02-08 14:26:45 +0000
commit2c1fbea5319db2c64fa486adb32b5e66680b6daf (patch)
treef34fb636206664ffa531e30d703469ff1a6d3a19 /synapse/storage/presence.py
parentAdd metrics to pushers (diff)
downloadsynapse-2c1fbea5319db2c64fa486adb32b5e66680b6daf.tar.xz
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(