summary refs log tree commit diff
path: root/synapse/storage/relations.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-05-16 14:21:39 +0100
committerErik Johnston <erik@matrix.org>2019-05-16 14:21:39 +0100
commit2c662ddde4e1277a0dc17295748aa5f0c41fa163 (patch)
tree3c1ed3940c640ff2d193990370e9b077bdec36ca /synapse/storage/relations.py
parentCheck that event is visible in new APIs (diff)
downloadsynapse-2c662ddde4e1277a0dc17295748aa5f0c41fa163.tar.xz
Indirect tuple conversion
Diffstat (limited to '')
-rw-r--r--synapse/storage/relations.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/storage/relations.py b/synapse/storage/relations.py
index 732418ec65..996cb6903a 100644
--- a/synapse/storage/relations.py
+++ b/synapse/storage/relations.py
@@ -81,6 +81,9 @@ class RelationPaginationToken(object):
     def to_string(self):
         return "%d-%d" % (self.topological, self.stream)
 
+    def as_tuple(self):
+        return attr.astuple(self)
+
 
 @attr.s
 class AggregationPaginationToken(object):
@@ -108,6 +111,9 @@ class AggregationPaginationToken(object):
     def to_string(self):
         return "%d-%d" % (self.count, self.stream)
 
+    def as_tuple(self):
+        return attr.astuple(self)
+
 
 class RelationsWorkerStore(SQLBaseStore):
     @cached(tree=True)