summary refs log tree commit diff
path: root/synapse/storage/relations.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/relations.py')
-rw-r--r--synapse/storage/relations.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/synapse/storage/relations.py b/synapse/storage/relations.py
index 996cb6903a..de67e305a1 100644
--- a/synapse/storage/relations.py
+++ b/synapse/storage/relations.py
@@ -54,7 +54,7 @@ class PaginationChunk(object):
         return d
 
 
-@attr.s
+@attr.s(frozen=True, slots=True)
 class RelationPaginationToken(object):
     """Pagination token for relation pagination API.
 
@@ -85,7 +85,7 @@ class RelationPaginationToken(object):
         return attr.astuple(self)
 
 
-@attr.s
+@attr.s(frozen=True, slots=True)
 class AggregationPaginationToken(object):
     """Pagination token for relation aggregation pagination API.
 
@@ -151,12 +151,6 @@ class RelationsWorkerStore(SQLBaseStore):
             requested. The rows are of the form `{"event_id": "..."}`.
         """
 
-        if from_token:
-            from_token = RelationPaginationToken.from_string(from_token)
-
-        if to_token:
-            to_token = RelationPaginationToken.from_string(to_token)
-
         where_clause = ["relates_to_id = ?"]
         where_args = [event_id]
 
@@ -258,12 +252,6 @@ class RelationsWorkerStore(SQLBaseStore):
             match. Each row is a dict with `type`, `key` and `count` fields.
         """
 
-        if from_token:
-            from_token = AggregationPaginationToken.from_string(from_token)
-
-        if to_token:
-            to_token = AggregationPaginationToken.from_string(to_token)
-
         where_clause = ["relates_to_id = ?", "relation_type = ?"]
         where_args = [event_id, RelationTypes.ANNOTATION]