From 71bb3353ab8be27684612b23972f61e366d18609 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:19:35 +0530 Subject: [PATCH 1/4] init --- proposals/xxxx-pinned-events-read-marker.md | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 proposals/xxxx-pinned-events-read-marker.md diff --git a/proposals/xxxx-pinned-events-read-marker.md b/proposals/xxxx-pinned-events-read-marker.md new file mode 100644 index 00000000000..1ea224406fe --- /dev/null +++ b/proposals/xxxx-pinned-events-read-marker.md @@ -0,0 +1,30 @@ +# MSCXXXX: Pinned events read marker + +Currently, messages are pinned using the `m.room.pinned_events` state event (see [specification](https://spec.matrix.org/v1.12/client-server-api/#mroompinned_events)). However, when new messages are pinned by the super user, other users can not detect newly pinned messages. + +It primarily happen because `m.room.pinned_events` does not have any information that can help users detect the change. Resulting in users having no visual clues about newly pinned message. To cope with it they either have to mentally remember the total number of pinned message or discovery of `m.room.pinned_events` state event in clients timeline reminds them to check for possibly new pinned messages. + +## Proposal + +Client should set read marker in user's room account data (see [specification](https://spec.matrix.org/v1.12/client-server-api/#put_matrixclientv3useruseridroomsroomidaccount_datatype)) after detecting that the user has read the pinned messages. The `type` of this account data is `m.read.pinned_events` and body content look like: +```json +{ + event_id: "$xyz" +} +``` +where `$xyz` is the `event_id` of `m.room.pinned_events` state event, signifying all pinned events as read. + +Subsequently, when client receives the new `m.room.pinned_events` state event, it can fetch the previously marked state event using the [/rooms/{roomId}/event/{event}](https://spec.matrix.org/v1.12/client-server-api/#get_matrixclientv3roomsroomideventeventid) endpoint. It can then identify the newly pinned messages by filtering the received state event for event IDs that are not present in the previously marked state event. + + +## Potential issues +Unknown + +## Alternative +Unknown + +## Security considerations +Unknown + +## Unstable prefix +`org.matrix.mscXXXX.read.pinned_events` for `m.read.pinned_events` \ No newline at end of file From f16a605821ec7479b06f63ab505f4e09fbfd4de7 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:48:30 +0530 Subject: [PATCH 2/4] add msc number --- ...vents-read-marker.md => 4238-pinned-events-read-marker.md} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename proposals/{xxxx-pinned-events-read-marker.md => 4238-pinned-events-read-marker.md} (94%) diff --git a/proposals/xxxx-pinned-events-read-marker.md b/proposals/4238-pinned-events-read-marker.md similarity index 94% rename from proposals/xxxx-pinned-events-read-marker.md rename to proposals/4238-pinned-events-read-marker.md index 1ea224406fe..4ca9bfd1ed0 100644 --- a/proposals/xxxx-pinned-events-read-marker.md +++ b/proposals/4238-pinned-events-read-marker.md @@ -1,4 +1,4 @@ -# MSCXXXX: Pinned events read marker +# MSC4238: Pinned events read marker Currently, messages are pinned using the `m.room.pinned_events` state event (see [specification](https://spec.matrix.org/v1.12/client-server-api/#mroompinned_events)). However, when new messages are pinned by the super user, other users can not detect newly pinned messages. @@ -27,4 +27,4 @@ Unknown Unknown ## Unstable prefix -`org.matrix.mscXXXX.read.pinned_events` for `m.read.pinned_events` \ No newline at end of file +`org.matrix.msc4238.read.pinned_events` for `m.read.pinned_events` \ No newline at end of file From c96c420bdd9b110ee4f07502499001a353949838 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:49:00 +0530 Subject: [PATCH 3/4] fix json formatting --- proposals/4238-pinned-events-read-marker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/4238-pinned-events-read-marker.md b/proposals/4238-pinned-events-read-marker.md index 4ca9bfd1ed0..1b49a085194 100644 --- a/proposals/4238-pinned-events-read-marker.md +++ b/proposals/4238-pinned-events-read-marker.md @@ -9,7 +9,7 @@ It primarily happen because `m.room.pinned_events` does not have any information Client should set read marker in user's room account data (see [specification](https://spec.matrix.org/v1.12/client-server-api/#put_matrixclientv3useruseridroomsroomidaccount_datatype)) after detecting that the user has read the pinned messages. The `type` of this account data is `m.read.pinned_events` and body content look like: ```json { - event_id: "$xyz" + "event_id": "$xyz" } ``` where `$xyz` is the `event_id` of `m.room.pinned_events` state event, signifying all pinned events as read. From 07254b6c07687c4c8dcac382aa4b9a1b637437d2 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:50:55 +0530 Subject: [PATCH 4/4] wrap line at 120 characters --- proposals/4238-pinned-events-read-marker.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/proposals/4238-pinned-events-read-marker.md b/proposals/4238-pinned-events-read-marker.md index 1b49a085194..7605ee2fab7 100644 --- a/proposals/4238-pinned-events-read-marker.md +++ b/proposals/4238-pinned-events-read-marker.md @@ -1,12 +1,20 @@ # MSC4238: Pinned events read marker -Currently, messages are pinned using the `m.room.pinned_events` state event (see [specification](https://spec.matrix.org/v1.12/client-server-api/#mroompinned_events)). However, when new messages are pinned by the super user, other users can not detect newly pinned messages. +Currently, messages are pinned using the `m.room.pinned_events` state event (see +[specification](https://spec.matrix.org/v1.12/client-server-api/#mroompinned_events)). However, when new messages are +pinned by the super user, other users can not detect newly pinned messages. -It primarily happen because `m.room.pinned_events` does not have any information that can help users detect the change. Resulting in users having no visual clues about newly pinned message. To cope with it they either have to mentally remember the total number of pinned message or discovery of `m.room.pinned_events` state event in clients timeline reminds them to check for possibly new pinned messages. +It primarily happen because `m.room.pinned_events` does not have any information that can help users detect the change. +Resulting in users having no visual clues about newly pinned message. To cope with it they either have to mentally +remember the total number of pinned message or discovery of `m.room.pinned_events` state event in clients timeline +reminds them to check for possibly new pinned messages. ## Proposal -Client should set read marker in user's room account data (see [specification](https://spec.matrix.org/v1.12/client-server-api/#put_matrixclientv3useruseridroomsroomidaccount_datatype)) after detecting that the user has read the pinned messages. The `type` of this account data is `m.read.pinned_events` and body content look like: +Client should set read marker in user's room account data (see +[specification](https://spec.matrix.org/v1.12/client-server-api/#put_matrixclientv3useruseridroomsroomidaccount_datatype)) +after detecting that the user has read the pinned messages. The `type` of this account data is `m.read.pinned_events` +and body content look like: ```json { "event_id": "$xyz" @@ -14,7 +22,11 @@ Client should set read marker in user's room account data (see [specification](h ``` where `$xyz` is the `event_id` of `m.room.pinned_events` state event, signifying all pinned events as read. -Subsequently, when client receives the new `m.room.pinned_events` state event, it can fetch the previously marked state event using the [/rooms/{roomId}/event/{event}](https://spec.matrix.org/v1.12/client-server-api/#get_matrixclientv3roomsroomideventeventid) endpoint. It can then identify the newly pinned messages by filtering the received state event for event IDs that are not present in the previously marked state event. +Subsequently, when client receives the new `m.room.pinned_events` state event, it can fetch the previously marked state +event using the +[/rooms/{roomId}/event/{event}](https://spec.matrix.org/v1.12/client-server-api/#get_matrixclientv3roomsroomideventeventid) +endpoint. It can then identify the newly pinned messages by filtering the received state event for event IDs that are +not present in the previously marked state event. ## Potential issues