Add room summary spec
@@ -129,6 +129,50 @@ paths:
title: Joined Room
type: object
properties:
+ summary:
+ title: RoomSummary
+ type: object
+ description: |-
+ Information about the room which clients may need to
+ correctly render it to users.
+ properties:
+ "m.heroes":
+ type: array
+ description: |-
+ The users which can be used to generate a room name
+ if the room does not have one. Required if the room
+ does not have a ``m.room.name`` or ``m.room.canonical_alias``
+ state event with non-empty content.
+
+ This should be the first 5 members of the room, ordered
+ by stream ordering, which are joined or invited. The
+ list must never include the client's own user ID. When
+ no joined or invited members are available, this should
+ consist of the banned and left users. More than 5 members
+ may be provided, however less than 5 should only be provided
+ when there are less than 5 members to represent.
+
+ When lazy-loading room members is enabled, the membership
+ events for the heroes MUST be included in the ``state``,
+ unless they are redundant. When the list of users changes,
+ the server notifies the client by sending a fresh list of
+ heroes. If there are no changes since the last sync, this
+ field may be omitted.
+ items:
+ type: string
+ "m.joined_member_count":
+ type: integer
+ description: |-
+ The number of users with ``membership`` of ``join``,
+ including the client's own user ID. If this field has
+ not changed since the last sync, it may be omitted.
+ Required otherwise.
+ "m.invited_member_count":
+ type: integer
+ description: |-
+ The number of users with ``membership`` of ``invite``.
+ If this field has not changed since the last sync, it
+ may be omitted. Required otherwise.
state:
title: State
type: object
@@ -334,6 +378,14 @@ paths:
"rooms": {
"join": {
"!726s6s6q:example.com": {
+ "summary": {
+ "m.heroes": [
+ "@alice:example.com",
+ "@bob:example.com"
+ ],
+ "m.joined_member_count": 2,
+ "m.invited_member_count": 0
+ },
"state": {
"events": [
{
