summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-11-05 15:52:39 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2021-11-16 12:59:17 +0000
commit78bd5eaa4fff1fad0139693f6a1b652fa8f4b3a3 (patch)
treed2da97f210f4a9155667d2aac7b4c97bd02a254a
parentAdd a new ephemeral AS handler for to_device message edus (diff)
downloadsynapse-78bd5eaa4fff1fad0139693f6a1b652fa8f4b3a3.tar.xz
Allow setting/getting stream id per appservice for to-device messages
-rw-r--r--synapse/storage/databases/main/appservice.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/appservice.py b/synapse/storage/databases/main/appservice.py
index baec35ee27..92e6a491c9 100644
--- a/synapse/storage/databases/main/appservice.py
+++ b/synapse/storage/databases/main/appservice.py
@@ -387,7 +387,7 @@ class ApplicationServiceTransactionWorkerStore(
     async def get_type_stream_id_for_appservice(
         self, service: ApplicationService, type: str
     ) -> int:
-        if type not in ("read_receipt", "presence"):
+        if type not in ("read_receipt", "presence", "to_device"):
             raise ValueError(
                 "Expected type to be a valid application stream id type, got %s"
                 % (type,)
@@ -414,7 +414,7 @@ class ApplicationServiceTransactionWorkerStore(
     async def set_type_stream_id_for_appservice(
         self, service: ApplicationService, stream_type: str, pos: Optional[int]
     ) -> None:
-        if stream_type not in ("read_receipt", "presence"):
+        if stream_type not in ("read_receipt", "presence", "to_device"):
             raise ValueError(
                 "Expected type to be a valid application stream id type, got %s"
                 % (stream_type,)