From 7f8f9e118885603192da0cfb40384791674b166b Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 20 Jul 2021 18:17:56 +0200 Subject: [PATCH 01/10] add room type in store invite --- .../3288-pass_room_type_in_3pid_invite.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 proposals/3288-pass_room_type_in_3pid_invite.md diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md new file mode 100644 index 00000000000..3ea27efb1f7 --- /dev/null +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -0,0 +1,65 @@ +# MSC3288: Make email invites space aware + +Currently when inviting via 3pid, the Identity Server is getting 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, 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 + +Home servers 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` + +| 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 `m.room.create` event. + +```` +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. + + +## Potential issues + +None. + + +## Security considerations + +None. + +## Unstable prefix + +The following mapping will be used for identifiers in this MSC during development: + + +Proposed final identifier | Purpose | Development identifier +------------------------------- | ------- | ---- +`room_type` | event type | `org.matrix.msc3288.room_type` \ No newline at end of file From 2827cb69359bb7e9a3b60b0de46d358c0cbba6f0 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 20 Jul 2021 18:24:11 +0200 Subject: [PATCH 02/10] update dev identifier purpose --- proposals/3288-pass_room_type_in_3pid_invite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index 3ea27efb1f7..af8a446b2a4 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -62,4 +62,4 @@ The following mapping will be used for identifiers in this MSC during developmen Proposed final identifier | Purpose | Development identifier ------------------------------- | ------- | ---- -`room_type` | event type | `org.matrix.msc3288.room_type` \ No newline at end of file +`room_type` | POST body | `org.matrix.msc3288.room_type` \ No newline at end of file From 814a86ddcc759ba374318ac1fe58b72fc9aa6866 Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 26 Jul 2021 16:48:02 +0200 Subject: [PATCH 03/10] Added clarification if type not present, and on email generation --- proposals/3288-pass_room_type_in_3pid_invite.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index af8a446b2a4..06868ac4df6 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -22,7 +22,7 @@ Add a new `room_type` field in json body of `POST /_matrix/identity/v2/store-inv | 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 `m.room.create` event. +| 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. Do not include paremeter if not `type` not present in `m.room.create`. ```` POST /_matrix/identity/v2/store-invite HTTP/1.1 @@ -45,6 +45,10 @@ Content-Type: application/json 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 From 80c7ed70ab9a0cd211944cfd9b605da08ea18345 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 7 Oct 2021 15:04:32 +0200 Subject: [PATCH 04/10] Update proposals/3288-pass_room_type_in_3pid_invite.md Co-authored-by: Travis Ralston --- proposals/3288-pass_room_type_in_3pid_invite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index 06868ac4df6..26b5214067b 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -13,7 +13,7 @@ The goal of this proposal is to make 3pid invites space aware. ## Proposal -Home servers should also send the `room_type` to the identity server when performing a third party invite (__Invitation storage__). +Homeservers should also send the `room_type` to the identity server when performing a third party invite (__Invitation storage__). __Proposed change:__ From b361ef60ff55d1e32b35d15b8f668283fc1bf5e3 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 7 Oct 2021 15:05:33 +0200 Subject: [PATCH 05/10] Update proposals/3288-pass_room_type_in_3pid_invite.md Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- proposals/3288-pass_room_type_in_3pid_invite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index 26b5214067b..be2b5811241 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -1,6 +1,6 @@ # MSC3288: Make email invites space aware -Currently when inviting via 3pid, the Identity Server is getting some information about the room, +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. From e267d7441a52a59ef991ff2f53b54527c150e3bc Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 7 Oct 2021 15:05:48 +0200 Subject: [PATCH 06/10] Update proposals/3288-pass_room_type_in_3pid_invite.md Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- proposals/3288-pass_room_type_in_3pid_invite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index be2b5811241..783af410be4 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -18,7 +18,7 @@ Homeservers should also send the `room_type` to the identity server when perform __Proposed change:__ -Add a new `room_type` field in json body of `POST /_matrix/identity/v2/store-invite` +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 | |--|--|--| From 4f0372216a138cbdf21bfb50fd331a0868c33f6f Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 7 Oct 2021 15:06:22 +0200 Subject: [PATCH 07/10] Update proposals/3288-pass_room_type_in_3pid_invite.md Co-authored-by: Travis Ralston --- proposals/3288-pass_room_type_in_3pid_invite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index 783af410be4..627c6c81593 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -22,7 +22,7 @@ Add a new `room_type` field in json body of [`POST /_matrix/identity/v2/store-in | 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 `m.room.create` event. Do not include paremeter if not `type` not present in `m.room.create`. +| 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 not `type` not present in `m.room.create`. ```` POST /_matrix/identity/v2/store-invite HTTP/1.1 From cb93e5d3b1f06379e771613bb8b4c11eb383b2f4 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 7 Oct 2021 15:06:35 +0200 Subject: [PATCH 08/10] Update proposals/3288-pass_room_type_in_3pid_invite.md Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- proposals/3288-pass_room_type_in_3pid_invite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index 627c6c81593..d02ec2a61b4 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -1,4 +1,4 @@ -# MSC3288: Make email invites space aware +# 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. From 9434aba3969548358b78d93c5162790a8432aba4 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 7 Oct 2021 15:07:34 +0200 Subject: [PATCH 09/10] Update proposals/3288-pass_room_type_in_3pid_invite.md Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- proposals/3288-pass_room_type_in_3pid_invite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index d02ec2a61b4..2e26ecfded6 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -5,7 +5,7 @@ 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, current implementation would say wrongly that +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. From e358df186913e117b7d5f9f7636fc4f3c97bb2ac Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 7 Oct 2021 15:55:52 +0200 Subject: [PATCH 10/10] Update 3288-pass_room_type_in_3pid_invite.md fix typo --- proposals/3288-pass_room_type_in_3pid_invite.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/3288-pass_room_type_in_3pid_invite.md b/proposals/3288-pass_room_type_in_3pid_invite.md index 2e26ecfded6..408573c08b1 100644 --- a/proposals/3288-pass_room_type_in_3pid_invite.md +++ b/proposals/3288-pass_room_type_in_3pid_invite.md @@ -22,7 +22,7 @@ Add a new `room_type` field in json body of [`POST /_matrix/identity/v2/store-in | 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 not `type` not present in `m.room.create`. +| 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 @@ -66,4 +66,4 @@ The following mapping will be used for identifiers in this MSC during developmen Proposed final identifier | Purpose | Development identifier ------------------------------- | ------- | ---- -`room_type` | POST body | `org.matrix.msc3288.room_type` \ No newline at end of file +`room_type` | POST body | `org.matrix.msc3288.room_type`