diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py
index 71b2bb084d..67f5bf54d0 100644
--- a/synapse/storage/presence.py
+++ b/synapse/storage/presence.py
@@ -35,17 +35,15 @@ class PresenceStore(SQLBaseStore):
return self._simple_select_one(
table="presence",
keyvalues={"user_id": user_localpart},
- retcols=["state", "status_msg", "mtime"],
+ retcols=["presence", "status_msg", "last_active"],
)
def set_presence_state(self, user_localpart, new_state):
return self._simple_update_one(
table="presence",
keyvalues={"user_id": user_localpart},
- updatevalues={"state": new_state["state"],
- "status_msg": new_state["status_msg"],
- "mtime": self._clock.time_msec()},
- retcols=["state"],
+ updatevalues=new_state,
+ retcols=["presence"],
)
def allow_presence_visible(self, observed_localpart, observer_userid):
|