summary refs log tree commit diff
path: root/synapse/storage/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-14 10:01:04 +0100
committerErik Johnston <erik@matrix.org>2014-08-14 10:01:04 +0100
commit10294b60824347d73b01f7ce4add18467d1e6f0c (patch)
tree06d04a0a2e0ccf183bfc602ce9694d5958ed7a2e /synapse/storage/presence.py
parentMake feedback table also store sender. (diff)
parentgrammar fix (diff)
downloadsynapse-10294b60824347d73b01f7ce4add18467d1e6f0c.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts:
	synapse/storage/_base.py
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 6f5b042c25..23b6d1694e 100644
--- a/synapse/storage/presence.py
+++ b/synapse/storage/presence.py
@@ -35,7 +35,7 @@ class PresenceStore(SQLBaseStore):
         return self._simple_select_one(
             table="presence",
             keyvalues={"user_id": user_localpart},
-            retcols=["state", "status_msg"],
+            retcols=["state", "status_msg", "mtime"],
         )
 
     def set_presence_state(self, user_localpart, new_state):
@@ -43,7 +43,8 @@ class PresenceStore(SQLBaseStore):
             table="presence",
             keyvalues={"user_id": user_localpart},
             updatevalues={"state": new_state["state"],
-                          "status_msg": new_state["status_msg"]},
+                          "status_msg": new_state["status_msg"],
+                          "mtime": self._clock.time_msec()},
             retcols=["state"],
         )