Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
5a11a8ef
Commit
5a11a8ef
authored
10 years ago
by
Kegan Dougal
Browse files
Options
Downloads
Patches
Plain Diff
Flesh out Room Events.
parent
9b61076d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/specification.rst
+99
-17
99 additions, 17 deletions
docs/specification.rst
with
99 additions
and
17 deletions
docs/specification.rst
+
99
−
17
View file @
5a11a8ef
...
@@ -417,7 +417,7 @@ State events can be sent by ``PUT`` ing to ``/rooms/<room id>/state/<event type>
...
@@ -417,7 +417,7 @@ State events can be sent by ``PUT`` ing to ``/rooms/<room id>/state/<event type>
These events will be overwritten if ``<room id>``, ``<event type>`` and ``<state key>`` all match.
These events will be overwritten if ``<room id>``, ``<event type>`` and ``<state key>`` all match.
If the state event has no ``state_key``, it can be omitted from the path. These requests
If the state event has no ``state_key``, it can be omitted from the path. These requests
**cannot use transaction IDs** like other ``PUT`` paths because they cannot be differentiated
**cannot use transaction IDs** like other ``PUT`` paths because they cannot be differentiated
from the ``state
key``. Furthermore, ``POST`` is unsupported on state paths. Valid requests
from the ``state
_
key``. Furthermore, ``POST`` is unsupported on state paths. Valid requests
look like::
look like::
PUT /rooms/!roomid:domain/state/m.example.event
PUT /rooms/!roomid:domain/state/m.example.event
...
@@ -440,7 +440,7 @@ Care should be taken to avoid setting the wrong ``state key``::
...
@@ -440,7 +440,7 @@ Care should be taken to avoid setting the wrong ``state key``::
{ "key" : "with '11' as the state key, but was probably intended to be a txnId" }
{ "key" : "with '11' as the state key, but was probably intended to be a txnId" }
The ``state_key`` is often used to store state about individual users, by using the user ID as the
The ``state_key`` is often used to store state about individual users, by using the user ID as the
value. For example::
``state_key``
value. For example::
PUT /rooms/!roomid:domain/state/m.favorite.animal.event/%40my_user%3Adomain.com
PUT /rooms/!roomid:domain/state/m.favorite.animal.event/%40my_user%3Adomain.com
{ "animal" : "cat", "reason": "fluffy" }
{ "animal" : "cat", "reason": "fluffy" }
...
@@ -493,24 +493,106 @@ Room Events
...
@@ -493,24 +493,106 @@ Room Events
This specification outlines several standard event types, all of which are
This specification outlines several standard event types, all of which are
prefixed with ``m.``
prefixed with ``m.``
State messages
``m.room.name``
--------------
Summary:
- m.room.name
Set the human-readable name for the room.
- m.room.topic
Type:
- m.room.member
State event
- m.room.config
JSON format:
- m.room.invite_join
``{ "name" : "string" }``
Example:
``{ "name" : "My Room" }``
Description:
A room has an opaque room ID which is not human-friendly to read. A room alias is
human-friendly, but not all rooms have room aliases. The room name is a human-friendly
string designed to be displayed to the end-user. The room name is not *unique*, as
multiple rooms can have the same room name set. The room name can also be set when
creating a room using ``/createRoom`` with the ``name`` key.
``m.room.topic``
Summary:
Set a topic for the room.
Type:
State event
JSON format:
``{ "topic" : "string" }``
Example:
``{ "topic" : "Welcome to the real world." }``
Description:
A topic is a short message detailing what is currently being discussed in the room.
It can also be used as a way to display extra information about the room, which may
not be suitable for the room name.
What are they, when are they used, what do they contain, how should they be used.
``m.room.member``
Link back to explanatory sections (e.g. invite/join/leave sections for m.room.member)
Summary:
The current membership state of a user in the room.
Type:
State event
JSON format:
``{ "membership" : "enum[ invite|join|leave|ban ]" }``
Example:
``{ "membership" : "join" }``
Description:
The membership state of a user is automatically set when using the membership APIs:
``/rooms/<room id>/invite``, ``/rooms/<room id>/join`` and ``/rooms/<room id>/leave``.
See the "Rooms" section for how to use those APIs.
Non-state messages
``m.room.config``
------------------
Summary:
- m.room.message
The room config.
- m.room.message.feedback (and compressed format)
Type:
- voip?
State event
JSON format:
TODO
Example:
TODO
Description:
TODO
What are they, when are they used, what do they contain, how should they be used
``m.room.invite_join``
Summary:
TODO.
Type:
State event
JSON format:
TODO
Example:
TODO
Description:
TODO
``m.room.message``
Summary:
A message.
Type:
Non-state event
JSON format:
``{ "msgtype": "string" }``
Example:
``{ "msgtype": "m.text", "body": "Testing" }``
Description:
This event is used when sending messages in a room. Messages are not limited to be text.
The ``msgtype`` key outlines the type of message, e.g. text, audio, image, video, etc.
Whilst not required, the ``body`` key SHOULD be used with every kind of ``msgtype`` as
a fallback mechanism when a client cannot render the message. For more information on
the types of messages which can be sent, see "m.room.message msgtypes".
``m.room.message.feedback``
Summary:
A receipt for a message.
Type:
Non-state event
JSON format:
``{ "type": "enum [ delivered|read ]", "target_event_id": "string" }``
Example:
``{ "type": "delivered", "target_event_id": "e3b2icys" }``
Description:
Feedback events are events sent to acknowledge a message in some way. There are two
supported acknowledgements: ``delivered`` (sent when the event has been received) and
``read`` (sent when the event has been observed by the end-user). The ``target_event_id``
should reference the ``m.room.message`` event being acknowledged.
- voip?
m.room.message msgtypes
m.room.message msgtypes
-----------------------
-----------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment