Mutual Rooms

Get the list of rooms that the user shares with another user.

Get the list of rooms that the user shares with another user. The server will return a list of room IDs that the user shares with the specified user_id.

get/_matrix/client/v1/mutual_rooms

Request

Query parameters

user_idstring mx-user-id required

The MXID of the user to check for mutual rooms with.

fromstring

A pagination token from a previous result. This should be a next_batch result from a previous call to this endpoint. If not provided, the server will return the first batch of results.

Response

A list of room IDs that the user shares with the specified user. If the provided user_id is not a valid user, the server MUST return an empty list of rooms.

countinteger required

The number of such rooms. This is the total count even if the response is batched and joined doesn't include all rooms. This MAY be inaccurate if the server is unable to calculate the exact number of rooms.

joinedstring[] required

A list of room IDs where both the authenticated user and user_id have a membership of type join.

next_batchstring

A pagination token to retrieve the next batch of results. This will be absent if there are no more results to return.

Example response

{
  "count": 1,
  "joined": [
    "!OGEhHVWSdvArJzumhm:matrix.org"
  ],
  "next_batch": "next_batch_token"
}

Changes

No recorded changes to this operation across all 1 revision of this API.