mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-02-15 02:23:42 +01:00
Spec for MSC4267: Automatically forgetting rooms on leave
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
7066694571
commit
80d1a20f25
1
changelogs/client_server/newsfragments/2292.feature
Normal file
1
changelogs/client_server/newsfragments/2292.feature
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Add `m.forget_forced_upon_leave` capability for servers to transparently auto-forget rooms that the user leaves as per [MSC4267](https://github.com/matrix-org/matrix-spec-proposals/pull/4267).
|
||||||
|
|
@ -2619,6 +2619,38 @@ An example of the capability API's response for this capability is:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `m.forget_forced_upon_leave` capability
|
||||||
|
|
||||||
|
This capability has a single flag, `enabled`, which indicates whether or
|
||||||
|
not the server automatically forgets rooms which the user has left.
|
||||||
|
|
||||||
|
When `enabled` is `true` and the user leaves a room, the server will automatically
|
||||||
|
forget the room – just as if the user had called [`/forget`](#post_matrixclientv3roomsroomidforget)
|
||||||
|
themselves. This behavior applies irrespective of whether the user has left the
|
||||||
|
room on their own (through [`/leave`](#post_matrixclientv3roomsroomidleave)) or
|
||||||
|
has been kicked or banned from the room by another user.
|
||||||
|
|
||||||
|
When `enabled` is `false`, the server does not automatically forget rooms
|
||||||
|
upon leave. In this case, clients MAY distinguish the actions of leaving
|
||||||
|
and forgetting a room in their UI. Similarly, clients MAY retrieve and
|
||||||
|
visualize left but unforgotten rooms using a [filter](#filtering) with
|
||||||
|
`include_leave = true`.
|
||||||
|
|
||||||
|
When the capability or the `enabled` property are not present, clients SHOULD
|
||||||
|
assume that the server does not automatically forget rooms.
|
||||||
|
|
||||||
|
An example of the capability API's response for this capability is:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"capabilities": {
|
||||||
|
"m.forget_forced_upon_leave": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### `m.room_versions` capability
|
### `m.room_versions` capability
|
||||||
|
|
||||||
This capability describes the default and available room versions a
|
This capability describes the default and available room versions a
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,11 @@ paths:
|
||||||
m.change_password:
|
m.change_password:
|
||||||
$ref: '#/components/schemas/booleanCapability'
|
$ref: '#/components/schemas/booleanCapability'
|
||||||
description: Capability to indicate if the user can change their password.
|
description: Capability to indicate if the user can change their password.
|
||||||
|
m.forget_forced_upon_leave:
|
||||||
|
$ref: '#/components/schemas/booleanCapability'
|
||||||
|
description: |-
|
||||||
|
Capability to indicate if the server automatically forgets rooms once the user
|
||||||
|
leaves.
|
||||||
m.room_versions:
|
m.room_versions:
|
||||||
type: object
|
type: object
|
||||||
description: The room versions the server supports.
|
description: The room versions the server supports.
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,15 @@ paths:
|
||||||
If the user was invited to the room, but had not joined, this call
|
If the user was invited to the room, but had not joined, this call
|
||||||
serves to reject the invite.
|
serves to reject the invite.
|
||||||
|
|
||||||
The user will still be allowed to retrieve history from the room which
|
Servers MAY additionally forget the room when this endpoint is called –
|
||||||
they were previously allowed to see.
|
just as if the user had also invoked [`/forget`](/client-server-api/#post_matrixclientv3roomsroomidforget).
|
||||||
|
Servers that do this, MUST inform clients about this behavior using the
|
||||||
|
[`m.forget_forced_upon_leave`](/client-server-api/#mforget_forced_upon_leave-capability)
|
||||||
|
capability.
|
||||||
|
|
||||||
|
If the server doesn't automatically forget the room, the user will still be
|
||||||
|
allowed to retrieve history from the room which they were previously allowed
|
||||||
|
to see.
|
||||||
operationId: leaveRoom
|
operationId: leaveRoom
|
||||||
security:
|
security:
|
||||||
- accessTokenQuery: []
|
- accessTokenQuery: []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue