From 4776e0c04ce70a6a9bc11ec24e3b65c38049573d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 28 Sep 2015 14:49:55 +0100 Subject: [PATCH 1/5] Add creation_content key --- specification/1-client_server_api.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/1-client_server_api.rst b/specification/1-client_server_api.rst index 93e3cb90..260832c9 100644 --- a/specification/1-client_server_api.rst +++ b/specification/1-client_server_api.rst @@ -750,6 +750,16 @@ options which can be set when creating a room: This will tell the server to invite everyone in the list to the newly created room. +``creation_content`` + Type: + Object + Optional: + Yes + Value: + Extra keys to be added to the content of the ``m.room.create`` + Description: + Allows clients to add keys to the content of ``m.room.create``. + Example:: { From affc2cfc923222da6a10bd6c21dd7d24c8031747 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 28 Sep 2015 16:39:54 +0100 Subject: [PATCH 2/5] Add 'm.federate' flag to 'm.room.create; --- event-schemas/schema/v1/m.room.create | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/event-schemas/schema/v1/m.room.create b/event-schemas/schema/v1/m.room.create index f2e1ee92..bcbb10d2 100644 --- a/event-schemas/schema/v1/m.room.create +++ b/event-schemas/schema/v1/m.room.create @@ -12,6 +12,10 @@ "creator": { "type": "string", "description": "The ``user_id`` of the room creator. This is set by the homeserver." + }, + "m.federate": { + "type": "boolean", + "description": "Whether users on other servers can join this room." } }, "required": ["creator"] From 7b4c8a9f68624e106f3b0ee8aca502d98b88d615 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 29 Sep 2015 16:19:27 +0100 Subject: [PATCH 3/5] Indicate default for m.federate key --- event-schemas/schema/v1/m.room.create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event-schemas/schema/v1/m.room.create b/event-schemas/schema/v1/m.room.create index bcbb10d2..348b6d86 100644 --- a/event-schemas/schema/v1/m.room.create +++ b/event-schemas/schema/v1/m.room.create @@ -15,7 +15,7 @@ }, "m.federate": { "type": "boolean", - "description": "Whether users on other servers can join this room." + "description": "Whether users on other servers can join this room. Defaults to ``true`` if key does not exist." } }, "required": ["creator"] From 83b9497664f030ac2e1d3bae1a5faddb8425250f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 29 Sep 2015 16:21:10 +0100 Subject: [PATCH 4/5] Add context and example --- specification/1-client_server_api.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/1-client_server_api.rst b/specification/1-client_server_api.rst index 260832c9..dd58b357 100644 --- a/specification/1-client_server_api.rst +++ b/specification/1-client_server_api.rst @@ -756,7 +756,8 @@ options which can be set when creating a room: Optional: Yes Value: - Extra keys to be added to the content of the ``m.room.create`` + Extra keys to be added to the content of the ``m.room.create``. The server + will clober certain keys, e.g. ``creator``. Description: Allows clients to add keys to the content of ``m.room.create``. @@ -766,7 +767,10 @@ Example:: "visibility": "public", "room_alias_name": "thepub", "name": "The Grand Duke Pub", - "topic": "All about happy hour" + "topic": "All about happy hour", + "creation_content": { + "m.federate": false + } } The home server will create a ``m.room.create`` event when the room is created, From 912a8ca7605278322cc8f8c921002022ea4e34c7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 2 Oct 2015 10:30:45 +0100 Subject: [PATCH 5/5] Be more explicit about keys that are clobbered --- specification/1-client_server_api.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/1-client_server_api.rst b/specification/1-client_server_api.rst index dd58b357..40b46be0 100644 --- a/specification/1-client_server_api.rst +++ b/specification/1-client_server_api.rst @@ -757,7 +757,8 @@ options which can be set when creating a room: Yes Value: Extra keys to be added to the content of the ``m.room.create``. The server - will clober certain keys, e.g. ``creator``. + will clober the following keys: ``creator``. Future versions of this + spec may allow the server to clobber other keys if required. Description: Allows clients to add keys to the content of ``m.room.create``.