|
| 1 | +# MSC3288: Make email invites space aware |
| 2 | + |
| 3 | +Currently when inviting via 3pid, the Identity Server is getting some information about the room, |
| 4 | +like for example the room name and avatar as well as the inviter name. |
| 5 | +This allows the identity server to generate a rich email to the invitee. |
| 6 | + |
| 7 | +Now that the matrix spec supports spaces, it would be nice to also provide this information to the identity server |
| 8 | +so that the email invite could be customized for spaces, current implementation would say wrongly that |
| 9 | +you are invited to a room when the room is actually a space. |
| 10 | + |
| 11 | +The goal of this proposal is to make 3pid invites space aware. |
| 12 | + |
| 13 | + |
| 14 | +## Proposal |
| 15 | + |
| 16 | +Home servers should also send the `room_type` to the identity server when performing a third party invite (__Invitation storage__). |
| 17 | + |
| 18 | + |
| 19 | +__Proposed change:__ |
| 20 | + |
| 21 | +Add a new `room_type` field in json body of `POST /_matrix/identity/v2/store-invite` |
| 22 | + |
| 23 | +| Parameter | Type | Description | |
| 24 | +|--|--|--| |
| 25 | +| room_type | string | The room type for the room to which the user is invited. This should be retrieved from the value of `type` in `m.room.create` event. |
| 26 | + |
| 27 | +```` |
| 28 | +POST /_matrix/identity/v2/store-invite HTTP/1.1 |
| 29 | +Content-Type: application/json |
| 30 | +
|
| 31 | +{ |
| 32 | + "medium": "email", |
| 33 | + |
| 34 | + "room_id": "!something:example.org", |
| 35 | + "sender": "@bob:example.com", |
| 36 | + "room_alias": "#somewhere:exmaple.org", |
| 37 | + "room_avatar_url": "mxc://example.org/s0meM3dia", |
| 38 | + "room_join_rules": "public", |
| 39 | + "room_name": "The Bob Project", |
| 40 | + "room_type": "m.space", |
| 41 | + "sender_display_name": "Bob Smith", |
| 42 | + "sender_avatar_url": "mxc://example.org/an0th3rM3dia" |
| 43 | +} |
| 44 | +```` |
| 45 | + |
| 46 | +The identity server could then use room type to customize the email depending on the room type. |
| 47 | + |
| 48 | + |
| 49 | +## Potential issues |
| 50 | + |
| 51 | +None. |
| 52 | + |
| 53 | + |
| 54 | +## Security considerations |
| 55 | + |
| 56 | +None. |
| 57 | + |
| 58 | +## Unstable prefix |
| 59 | + |
| 60 | +The following mapping will be used for identifiers in this MSC during development: |
| 61 | + |
| 62 | + |
| 63 | +Proposed final identifier | Purpose | Development identifier |
| 64 | +------------------------------- | ------- | ---- |
| 65 | +`room_type` | event type | `org.matrix.msc3288.room_type` |
0 commit comments