From a1265a274b13384be5ac316d927adbdfe497461f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 29 Sep 2017 11:59:27 -0600 Subject: [PATCH 1/4] Add spec for m.room.pinned_events Signed-off-by: Travis Ralston --- .gitignore | 1 + event-schemas/examples/m.room.pinned_events | 12 ++++++++++ event-schemas/schema/m.room.pinned_events | 25 +++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 event-schemas/examples/m.room.pinned_events create mode 100644 event-schemas/schema/m.room.pinned_events diff --git a/.gitignore b/.gitignore index daef51d7..dccd3152 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /templating/out *.pyc *.swp +/env \ No newline at end of file diff --git a/event-schemas/examples/m.room.pinned_events b/event-schemas/examples/m.room.pinned_events new file mode 100644 index 00000000..6f41e97d --- /dev/null +++ b/event-schemas/examples/m.room.pinned_events @@ -0,0 +1,12 @@ +{ + "age": 242352, + "content": { + "pinned": ["$someevent:localhost"] + }, + "state_key": "", + "origin_server_ts": 1431961217939, + "event_id": "$WLGTSEFSEF:localhost", + "type": "m.room.pinned_events", + "room_id": "!Cuyf34gef24t:localhost", + "sender": "@example:localhost" +} diff --git a/event-schemas/schema/m.room.pinned_events b/event-schemas/schema/m.room.pinned_events new file mode 100644 index 00000000..7b4a0d61 --- /dev/null +++ b/event-schemas/schema/m.room.pinned_events @@ -0,0 +1,25 @@ +--- +allOf: + - $ref: core-event-schema/state_event.yaml +description: This event is used to "pin" particular events in a room for other participants to review later. The order of the pinned events is guaranteed and based upon the order supplied in the event. Clients should be aware that the current user may not be able to see some of the events pinned due to visibility settings in the room. Clients are responsible for determining if a particular event in the pinned list is displayable, and have the option to not display it if it cannot be pinned in the client. +properties: + content: + properties: + pinned: + description: An ordered list of event IDs to pin. + items: + type: string + type: array + required: + - pinned + type: object + state_key: + description: A zero-length string. + pattern: '^$' + type: string + type: + enum: + - m.room.pinned_events + type: string +title: Pinned events in a room +type: object From 5e7df0e87cd9ca1d06cb06a581d00426d8037875 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 17 Oct 2017 09:08:50 -0600 Subject: [PATCH 2/4] Update instant_messaging.rst Signed-off-by: Travis Ralston --- specification/modules/instant_messaging.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/modules/instant_messaging.rst b/specification/modules/instant_messaging.rst index 342050a7..ff87f74b 100644 --- a/specification/modules/instant_messaging.rst +++ b/specification/modules/instant_messaging.rst @@ -46,6 +46,8 @@ Usage of this event is discouraged for several reasons: {{m_room_avatar_event}} +{{m_room_pinned_events_event}} + m.room.message msgtypes ~~~~~~~~~~~~~~~~~~~~~~~ From 714c9223713c44fa043de5323c204a4e4e5deb25 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 17 Oct 2017 09:09:11 -0600 Subject: [PATCH 3/4] Update .gitignore Signed-off-by: Travis Ralston --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dccd3152..1742b2a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /api/node_modules /assets /assets.tar.gz +/env /scripts/gen /scripts/continuserv/continuserv /scripts/speculator/speculator @@ -8,4 +9,3 @@ /templating/out *.pyc *.swp -/env \ No newline at end of file From 198c969e6f21837d0c00d4f2ff24624239ebdce8 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 17 Oct 2017 09:12:28 -0600 Subject: [PATCH 4/4] Update client_server.rst Signed-off-by: Travis Ralston --- changelogs/client_server.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelogs/client_server.rst b/changelogs/client_server.rst index 9d9d246b..1db88795 100644 --- a/changelogs/client_server.rst +++ b/changelogs/client_server.rst @@ -48,6 +48,8 @@ (`#751 `_). - Add key distribution APIs, for use with end-to-end encryption. (`#894 `_). + - Add ``m.room.pinned_events`` state event for rooms. + (`#1007 `_). - Spec clarifications: