summary refs log tree commit diff
path: root/synapse/handlers/receipts.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-05-27 07:14:36 -0400
committerGitHub <noreply@github.com>2022-05-27 07:14:36 -0400
commitc52abc1cfdd9e5480cdb4a03d626fe61cacc6573 (patch)
tree0859f49a5d1e69ce8c844ba9d785c67a2a747854 /synapse/handlers/receipts.py
parentRemove federation client code for groups. (#12563) (diff)
downloadsynapse-c52abc1cfdd9e5480cdb4a03d626fe61cacc6573.tar.xz
Additional constants for EDU types. (#12884)
Instead of hard-coding strings in many places.
Diffstat (limited to 'synapse/handlers/receipts.py')
-rw-r--r--synapse/handlers/receipts.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/receipts.py b/synapse/handlers/receipts.py
index e6a35f1d09..43d2882b0a 100644
--- a/synapse/handlers/receipts.py
+++ b/synapse/handlers/receipts.py
@@ -14,7 +14,7 @@
 import logging
 from typing import TYPE_CHECKING, Iterable, List, Optional, Tuple
 
-from synapse.api.constants import ReceiptTypes
+from synapse.api.constants import EduTypes, ReceiptTypes
 from synapse.appservice import ApplicationService
 from synapse.streams import EventSource
 from synapse.types import (
@@ -52,11 +52,11 @@ class ReceiptsHandler:
         # to the appropriate worker.
         if hs.get_instance_name() in hs.config.worker.writers.receipts:
             hs.get_federation_registry().register_edu_handler(
-                "m.receipt", self._received_remote_receipt
+                EduTypes.RECEIPT, self._received_remote_receipt
             )
         else:
             hs.get_federation_registry().register_instances_for_edu(
-                "m.receipt",
+                EduTypes.RECEIPT,
                 hs.config.worker.writers.receipts,
             )