-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSC3288: Add room type to /_matrix/identity/v2/store-invite
API
#3288
Merged
turt2live
merged 10 commits into
matrix-org:old_master
from
BillCarsonFr:bca/make_email_invite_space_aware
Oct 23, 2021
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7f8f9e1
add room type in store invite
BillCarsonFr 2827cb6
update dev identifier purpose
BillCarsonFr 814a86d
Added clarification if type not present, and on email generation
BillCarsonFr 80c7ed7
Update proposals/3288-pass_room_type_in_3pid_invite.md
BillCarsonFr b361ef6
Update proposals/3288-pass_room_type_in_3pid_invite.md
BillCarsonFr e267d74
Update proposals/3288-pass_room_type_in_3pid_invite.md
BillCarsonFr 4f03722
Update proposals/3288-pass_room_type_in_3pid_invite.md
BillCarsonFr cb93e5d
Update proposals/3288-pass_room_type_in_3pid_invite.md
BillCarsonFr 9434aba
Update proposals/3288-pass_room_type_in_3pid_invite.md
BillCarsonFr e358df1
Update 3288-pass_room_type_in_3pid_invite.md
BillCarsonFr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# MSC3288: Add room type to `/_matrix/identity/v2/store-invite` API | ||
|
||
Currently when inviting via 3pid, the Identity Server receives some information about the room, | ||
like for example the room name and avatar as well as the inviter name. | ||
This allows the identity server to generate a rich email to the invitee. | ||
|
||
Now that the matrix spec supports spaces, it would be nice to also provide this information to the identity server | ||
so that the email invite could be customized for spaces. The current implementation would say wrongly that | ||
you are invited to a room when the room is actually a space. | ||
|
||
The goal of this proposal is to make 3pid invites space aware. | ||
|
||
|
||
## Proposal | ||
|
||
Homeservers should also send the `room_type` to the identity server when performing a third party invite (__Invitation storage__). | ||
|
||
|
||
__Proposed change:__ | ||
|
||
Add a new `room_type` field in json body of [`POST /_matrix/identity/v2/store-invite`](https://matrix.org/docs/spec/identity_service/r0.3.0#post-matrix-identity-v2-store-invite): | ||
|
||
| Parameter | Type | Description | | ||
|--|--|--| | ||
| 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 the `m.room.create` event's `content`. Do not include parameter if `type` is not present in `m.room.create`. | ||
|
||
```` | ||
POST /_matrix/identity/v2/store-invite HTTP/1.1 | ||
Content-Type: application/json | ||
|
||
{ | ||
"medium": "email", | ||
"address": "foo@example.com", | ||
"room_id": "!something:example.org", | ||
"sender": "@bob:example.com", | ||
"room_alias": "#somewhere:exmaple.org", | ||
"room_avatar_url": "mxc://example.org/s0meM3dia", | ||
"room_join_rules": "public", | ||
"room_name": "The Bob Project", | ||
"room_type": "m.space", | ||
"sender_display_name": "Bob Smith", | ||
"sender_avatar_url": "mxc://example.org/an0th3rM3dia" | ||
} | ||
```` | ||
|
||
The identity server could then use room type to customize the email depending on the room type. | ||
|
||
__Email Generation__ | ||
|
||
The link in the generated email should also pass over the `room_type` to clients ( like it is doing for | ||
`inviter_name`, `room_name`, `room_avatar`) | ||
|
||
## Potential issues | ||
|
||
None. | ||
|
||
|
||
## Security considerations | ||
|
||
None. | ||
BillCarsonFr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Unstable prefix | ||
|
||
The following mapping will be used for identifiers in this MSC during development: | ||
|
||
|
||
Proposed final identifier | Purpose | Development identifier | ||
------------------------------- | ------- | ---- | ||
`room_type` | POST body | `org.matrix.msc3288.room_type` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think any of this bit is specced currently...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I create a new PR to add them to the spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the intent of this MSC is clear enough. Would count the missing three as a spec omission.