mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-21 00:48:38 +01:00
Split the rooms out into a separate top level key.
Divide the rooms into separate groups in preparation for adding tag support. Further subdivide the rooms into "joined/invited/archived" based the membership of the user in the room because that membership affects what events the user can view from the room. E.g only users that are joined to a room may see the ephemeral events for the room.
This commit is contained in:
parent
a73cc50aa9
commit
bde003fe86
|
|
@ -5,7 +5,7 @@ info:
|
||||||
host: localhost:8008
|
host: localhost:8008
|
||||||
schemes:
|
schemes:
|
||||||
- https
|
- https
|
||||||
basePath: /_matrix/client/v2_alpha
|
basePath: /_matrix/client/api/v2_alpha
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
produces:
|
produces:
|
||||||
|
|
@ -73,12 +73,40 @@ paths:
|
||||||
``/sync`` request.
|
``/sync`` request.
|
||||||
rooms:
|
rooms:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
description: |-
|
||||||
roomlist:
|
The updates to rooms, grouped according to the filter. By
|
||||||
|
default there is a single ``default`` group.
|
||||||
|
additionalProperties:
|
||||||
|
joined:
|
||||||
type: array
|
type: array
|
||||||
description: |-
|
description: |-
|
||||||
A list of rooms that the client needs to update.
|
A list of room ids that the user is a member of that
|
||||||
|
have updates.
|
||||||
items:
|
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 a ``invite`` key
|
||||||
|
containing the ``m.room.member`` event of the invite.
|
||||||
|
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
|
||||||
|
``emphemeral`` 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
|
type: object
|
||||||
properties:
|
properties:
|
||||||
room_id:
|
room_id:
|
||||||
|
|
@ -129,8 +157,14 @@ paths:
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rooms": {
|
"rooms": {
|
||||||
"roomlist": [{
|
"default": {
|
||||||
"room_id": "!726s6s6q:example.com",
|
"invited": [],
|
||||||
|
"archived": [],
|
||||||
|
"joined": ["!726s6s6q:example.com"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"room_map": {
|
||||||
|
"!726s6s6q:example.com": {
|
||||||
"event_map": {
|
"event_map": {
|
||||||
"$66697273743031:example.com": {
|
"$66697273743031:example.com": {
|
||||||
"sender": "@alice:example.com",
|
"sender": "@alice:example.com",
|
||||||
|
|
@ -177,6 +211,6 @@ paths:
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue