diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-05-27 07:14:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 07:14:36 -0400 |
commit | c52abc1cfdd9e5480cdb4a03d626fe61cacc6573 (patch) | |
tree | 0859f49a5d1e69ce8c844ba9d785c67a2a747854 /synapse/handlers/device.py | |
parent | Remove federation client code for groups. (#12563) (diff) | |
download | synapse-c52abc1cfdd9e5480cdb4a03d626fe61cacc6573.tar.xz |
Additional constants for EDU types. (#12884)
Instead of hard-coding strings in many places.
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index b21e469865..438a549339 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -28,7 +28,7 @@ from typing import ( ) from synapse.api import errors -from synapse.api.constants import EventTypes +from synapse.api.constants import EduTypes, EventTypes from synapse.api.errors import ( Codes, FederationDeniedError, @@ -279,7 +279,8 @@ class DeviceHandler(DeviceWorkerHandler): federation_registry = hs.get_federation_registry() federation_registry.register_edu_handler( - "m.device_list_update", self.device_list_updater.incoming_device_list_update + EduTypes.DEVICE_LIST_UPDATE, + self.device_list_updater.incoming_device_list_update, ) hs.get_distributor().observe("user_left_room", self.user_left_room) |