summary refs log tree commit diff
path: root/synapse/storage/presence.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-04-04 00:38:21 +0100
committerMatthew Hodgson <matthew@matrix.org>2016-04-04 00:38:21 +0100
commit9f7dc2bef7cd39645ae74d96f2919a3f9fdb65ac (patch)
treeb818eb0b962de7e860584bb5286f98e60e12ac75 /synapse/storage/presence.py
parentreport image size (bytewise) in OG meta (diff)
parentMerge pull request #686 from matrix-org/markjh/doc_strings (diff)
downloadsynapse-9f7dc2bef7cd39645ae74d96f2919a3f9fdb65ac.tar.xz
Merge branch 'develop' into matthew/preview_urls
Diffstat (limited to 'synapse/storage/presence.py')
-rw-r--r--synapse/storage/presence.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py
index 4cec31e316..59b4ef5ce6 100644
--- a/synapse/storage/presence.py
+++ b/synapse/storage/presence.py
@@ -68,7 +68,9 @@ class PresenceStore(SQLBaseStore):
                 self._update_presence_txn, stream_orderings, presence_states,
             )
 
-        defer.returnValue((stream_orderings[-1], self._presence_id_gen.get_max_token()))
+        defer.returnValue((
+            stream_orderings[-1], self._presence_id_gen.get_current_token()
+        ))
 
     def _update_presence_txn(self, txn, stream_orderings, presence_states):
         for stream_id, state in zip(stream_orderings, presence_states):
@@ -155,7 +157,7 @@ class PresenceStore(SQLBaseStore):
         defer.returnValue([UserPresenceState(**row) for row in rows])
 
     def get_current_presence_token(self):
-        return self._presence_id_gen.get_max_token()
+        return self._presence_id_gen.get_current_token()
 
     def allow_presence_visible(self, observed_localpart, observer_userid):
         return self._simple_insert(