diff options
author | Erik Johnston <erik@matrix.org> | 2019-05-16 14:21:39 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-05-16 14:21:39 +0100 |
commit | 2c662ddde4e1277a0dc17295748aa5f0c41fa163 (patch) | |
tree | 3c1ed3940c640ff2d193990370e9b077bdec36ca /synapse/storage/relations.py | |
parent | Check that event is visible in new APIs (diff) | |
download | synapse-2c662ddde4e1277a0dc17295748aa5f0c41fa163.tar.xz |
Indirect tuple conversion
Diffstat (limited to 'synapse/storage/relations.py')
-rw-r--r-- | synapse/storage/relations.py | 6 |
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) |