@ -74,38 +74,9 @@ paths:
rooms:
type : object
description : |-
The updates to rooms, grouped according to the filter. By
default there is a single ``default`` group.
additionalProperties:
Updates to rooms.
properties:
joined:
type : array
description : |-
A list of room ids that the user is a member of that
have updates.
items:
type : string.
invited:
type : array
description : |-
A list of room ids that the user has been invited to.
The entries in the room_map will have an
``invite_state`` key. But will lack the ``ephemeral``
key, the ``timeline`` key and the ``state`` key.
items:
type : string.
archived:
type : array
description : |-
A list of room ids that the user has left or been
banned from. The entries in the room_map will have a
``state`` key and a ``timeline`` key. But will lack the
``ephemeral`` key.
items:
type : string.
room_map:
description : |-
Map from room id to the updates for that room. The room ids
are referenced from the ``rooms`` key.
type : object
additionalProperties:
type : object
@ -113,9 +84,9 @@ paths:
event_map:
type : object
description : |-
A map from event ID to events for this room. The events
are referenced from the ``timeline`` and ``state`` keys
for this room.
A map from event ID to events for this room. The
events are referenced from the ``timeline`` and
``state`` keys for this room.
additionalProperties:
description : An event object.
type : object
@ -126,30 +97,69 @@ paths:
- $ref : "definitions/room_event_batch.json"
timeline:
description : |-
The timeline of messages and state changes in the room.
The timeline of messages and state changes in the
room.
allOf:
- $ref : "definitions/timeline_batch.json"
ephemeral:
description : |-
The ephemeral events in the room that aren't recorded
in the timeline or state of the room. E.g. typing.
The ephemeral events in the room that aren't
recorded in the timeline or state of the room.
e.g. typing.
allOf:
- $ref : "definitions/event_batch.json"
invited:
type : object
description : |-
The rooms that the user has been invited to.
additionalProperties:
type : object
properties:
invite_state:
description : |-
The state of a room that the user has been invited to.
These state events may only have the `sender``,
``type``, ``state_key`` and ``content`` keys present.
These events do not replace any state that the client
already has for the room, for example if the client has
archived the room. Instead the client should keep two
separate copies of the state : the one from the
``invite_state`` and one from the archived ``state``.
If the client joins the room then the current state
will be given as a delta against the archived ``state``
not the ``invite_state``.
The state of a room that the user has been invited
to. These state events may only have the `sender``,
``type``, ``state_key`` and ``content`` keys
present. These events do not replace any state that
the client already has for the room, for example if
the client has archived the room. Instead the
client should keep two separate copies of the
state : the one from the ``invite_state`` and one
from the archived ``state``. If the client joins
the room then the current state will be given as a
delta against the archived ``state`` not the
``invite_state``.
allOf:
- $ref : "definitions/event_batch.json"
archived:
type : object
description : |-
The rooms that the user has left or been banned from. The
entries in the room_map will lack an ``ephemeral`` key.
additionalProperties:
type : object
properties:
event_map:
type : object
description : |-
A map from event ID to events for this room. The
events are referenced from the ``timeline`` and
``state`` keys for this room.
additionalProperties:
description : An event object.
type : object
state:
description : |-
The state updates for the room up to the point when
the user left.
allOf:
- $ref : "definitions/room_event_batch.json"
timeline:
description : |-
The timeline of messages and state changes in the
room up to the point when the user left.
allOf:
- $ref : "definitions/timeline_batch.json"
presence:
description : |-
The updates to the presence status of other users.
@ -169,13 +179,7 @@ paths:
]
},
"rooms": {
"default": {
"invited": [ "!696r7674:example.com" ] ,
"archived": [ ] ,
"joined": [ "!726s6s6q:example.com" ]
}
},
"room_map": {
"joined": {
"!726s6s6q:example.com": {
"event_map": {
"$66697273743031:example.com": {
@ -196,7 +200,10 @@ paths:
"sender": "@alice:example.com" ,
"type": "m.room.message" ,
"unsigned": {"age": "124524", "txn_id": "1234" },
"content": {"body": "I am a fish", "msgtype": "m.text" },
"content": {
"body": "I am a fish" ,
"msgtype": "m.text"
},
"origin_server_ts": 1417731086797
}
},
@ -223,7 +230,9 @@ paths:
}
]
}
}
},
"invited": {
"!696r7674:example.com": {
"invite_state": {
"events": [
@ -242,5 +251,7 @@ paths:
]
}
}
},
"archived": {}
}
}