From 197f4646bd9280959323a1175ba4ed471aea224a Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 18 Sep 2018 14:16:09 +0100 Subject: [PATCH] allow m.room.summary and m.room.encryption events in invites to provide better UX for clients receiving invites, so they can show a padlock icon or correct avatars on the inbound invite --- synapse/api/constants.py | 2 ++ synapse/config/api.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/synapse/api/constants.py b/synapse/api/constants.py index c2630c4c64..a1a7db8709 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -70,6 +70,8 @@ class EventTypes(object): RoomHistoryVisibility = "m.room.history_visibility" CanonicalAlias = "m.room.canonical_alias" RoomAvatar = "m.room.avatar" + RoomSummary = "m.room.summary" + RoomEncryption = "m.room.encryption" GuestAccess = "m.room.guest_access" # These are used for validation diff --git a/synapse/config/api.py b/synapse/config/api.py index 403d96ba76..0417778cc6 100644 --- a/synapse/config/api.py +++ b/synapse/config/api.py @@ -24,6 +24,8 @@ class ApiConfig(Config): EventTypes.JoinRules, EventTypes.CanonicalAlias, EventTypes.RoomAvatar, + EventTypes.RoomSummary, + EventTypes.RoomEncryption, EventTypes.Name, ]) @@ -36,5 +38,7 @@ class ApiConfig(Config): - "{JoinRules}" - "{CanonicalAlias}" - "{RoomAvatar}" + - "{RoomSummary}" + - "{RoomEncryption}" - "{Name}" """.format(**vars(EventTypes))