summary refs log tree commit diff
path: root/synapse/federation/transport
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/federation/transport
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/federation/transport')
-rw-r--r--synapse/federation/transport/server/federation.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/federation/transport/server/federation.py b/synapse/federation/transport/server/federation.py
index 57e8fb21b0..7dfb890661 100644
--- a/synapse/federation/transport/server/federation.py
+++ b/synapse/federation/transport/server/federation.py
@@ -27,6 +27,7 @@ from typing import (
 from matrix_common.versionstring import get_distribution_version_string
 from typing_extensions import Literal
 
+from synapse.api.constants import EduTypes
 from synapse.api.errors import Codes, SynapseError
 from synapse.api.room_versions import RoomVersions
 from synapse.api.urls import FEDERATION_UNSTABLE_PREFIX, FEDERATION_V2_PREFIX
@@ -108,7 +109,10 @@ class FederationSendServlet(BaseFederationServerServlet):
             )
 
             if issue_8631_logger.isEnabledFor(logging.DEBUG):
-                DEVICE_UPDATE_EDUS = ["m.device_list_update", "m.signing_key_update"]
+                DEVICE_UPDATE_EDUS = [
+                    EduTypes.DEVICE_LIST_UPDATE,
+                    EduTypes.SIGNING_KEY_UPDATE,
+                ]
                 device_list_updates = [
                     edu.get("content", {})
                     for edu in transaction_data.get("edus", [])