From 29340c6eb815dc2fedeec9f18468c58e385cda78 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 9 Jun 2019 22:50:23 -0600 Subject: [PATCH 1/2] Clarify that the common identifier format can be broken We already reference in the Event IDs section that the format depends on the room version, so we just need to link there. Fixes https://github.com/matrix-org/matrix-doc/issues/2103 --- specification/appendices/identifier_grammar.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/specification/appendices/identifier_grammar.rst b/specification/appendices/identifier_grammar.rst index ea805955..b5b0537a 100644 --- a/specification/appendices/identifier_grammar.rst +++ b/specification/appendices/identifier_grammar.rst @@ -88,8 +88,8 @@ Common Identifier Format ~~~~~~~~~~~~~~~~~~~~~~~~ The Matrix protocol uses a common format to assign unique identifiers to a -number of entities, including users, events and rooms. Each identifier takes -the form:: +number of entities, including users, events and rooms. Each identifier typically +takes the form:: &localpart:domain @@ -106,7 +106,9 @@ The sigil characters are as follows: * ``#``: Room alias The precise grammar defining the allowable format of an identifier depends on -the type of identifier. +the type of identifier. For example, event IDs can be represented without a +``domain`` component under some conditions - see the `Event IDs <#room-ids-and-event-ids>`_ +section below for more information. User Identifiers ++++++++++++++++ From ad2eefdde9b065800b5bc33e7697e14c8de82d90 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 10 Jun 2019 14:23:04 -0600 Subject: [PATCH 2/2] Shuffle and clarify identifier grammar Specifically, make it clearer that event IDs are the weird exception in this section. --- .../appendices/identifier_grammar.rst | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/specification/appendices/identifier_grammar.rst b/specification/appendices/identifier_grammar.rst index b5b0537a..c2c734ab 100644 --- a/specification/appendices/identifier_grammar.rst +++ b/specification/appendices/identifier_grammar.rst @@ -88,14 +88,13 @@ Common Identifier Format ~~~~~~~~~~~~~~~~~~~~~~~~ The Matrix protocol uses a common format to assign unique identifiers to a -number of entities, including users, events and rooms. Each identifier typically -takes the form:: +number of entities, including users, events and rooms. Each identifier takes +the form:: - &localpart:domain + &string -where ``&`` represents a 'sigil' character; ``domain`` is the `server name`_ of -the homeserver which allocated the identifier, and ``localpart`` is an -identifier allocated by that homeserver. +where ``&`` represents a 'sigil' character; ``string`` is the string which makes +up the identifier. The sigil characters are as follows: @@ -105,9 +104,16 @@ The sigil characters are as follows: * ``+``: Group ID * ``#``: Room alias +User IDs, group IDs, room IDs, room aliases, and sometimes event IDs take the form:: + + &localpart:domain + +where ``domain`` is the `server name`_ of the homeserver which allocated the +identifier, and ``localpart`` is an identifier allocated by that homeserver. + The precise grammar defining the allowable format of an identifier depends on -the type of identifier. For example, event IDs can be represented without a -``domain`` component under some conditions - see the `Event IDs <#room-ids-and-event-ids>`_ +the type of identifier. For example, event IDs can sometimes be represented with +a ``domain`` component under some conditions - see the `Event IDs <#room-ids-and-event-ids>`_ section below for more information. User Identifiers