diff options
author | Michael Telatynski <7t3chguy@gmail.com> | 2021-08-04 18:39:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 13:39:57 -0400 |
commit | 9db24cc50d252b1685a4ac69a736b49ed225dcb6 (patch) | |
tree | 7af2c709f30bc90840cff56e1997c7d0b3af436e /synapse/handlers/identity.py | |
parent | Add support for MSC2716 marker events (#10498) (diff) | |
download | synapse-9db24cc50d252b1685a4ac69a736b49ed225dcb6.tar.xz |
Send unstable-prefixed room_type in store-invite IS API requests (#10435)
The room type is per MSC3288 to allow the identity-server to change invitation wording based on whether the invitation is to a room or a space. The prefixed key will be replaced once MSC3288 is accepted into the spec.
Diffstat (limited to 'synapse/handlers/identity.py')
-rw-r--r-- | synapse/handlers/identity.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py index 0961dec5ab..8ffeabacf9 100644 --- a/synapse/handlers/identity.py +++ b/synapse/handlers/identity.py @@ -824,6 +824,7 @@ class IdentityHandler(BaseHandler): room_avatar_url: str, room_join_rules: str, room_name: str, + room_type: Optional[str], inviter_display_name: str, inviter_avatar_url: str, id_access_token: Optional[str] = None, @@ -843,6 +844,7 @@ class IdentityHandler(BaseHandler): notifications. room_join_rules: The join rules of the email (e.g. "public"). room_name: The m.room.name of the room. + room_type: The type of the room from its m.room.create event (e.g "m.space"). inviter_display_name: The current display name of the inviter. inviter_avatar_url: The URL of the inviter's avatar. @@ -869,6 +871,10 @@ class IdentityHandler(BaseHandler): "sender_display_name": inviter_display_name, "sender_avatar_url": inviter_avatar_url, } + + if room_type is not None: + invite_config["org.matrix.msc3288.room_type"] = room_type + # If a custom web client location is available, include it in the request. if self._web_client_location: invite_config["org.matrix.web_client_location"] = self._web_client_location |