with the user ID of the knocking user in the JSON body.
At this point, if the knocking user is on another homeserver, then the
homeserver of the rejecting user needs to send the `leave` event over
federation to the knocking homeserver. However, this is a bit tricky as it is
currently very difficult to have events from a room propagate over federation
if the receiving homeserver is not in the room. This is due to the remote
homeserver being unable to verify that the event being sent is actually from
a homeserver in the room - and that the homeserver in the room had the
required power level to send it. This is a problem that currently affects
other similar operations, such as disinviting or unbanning a federated user.
In both cases, they won't be notified as their homeserver is not in the room.
While we could send easily send the leave event as part of a generic
transaction to the remote homeserver, that homeserver would have no way to
@ -83,16 +113,12 @@ truth. This is almost an edge case though, as while you'll knock through one
homeserver in the room, there's no guarantee that the admin that denies your
knock will be on the same homeserver you knocked through. Perhaps the homeserver you knocked through could listen for this and then send the event back to you - but what if it goes offline in the meantime?
As such, this feature working over federation should be de-scoped for now,
and left to a future MSC which can solve this problem across the board for
all affected features in a proper way. Rejections should still work for the
homeservers that are in the room however.
As such, this feature working over federation is de-scoped for now, and left
to a future MSC which can solve this problem across the board for all
affected features in a suitable way. Rejections should still work for the
homeservers that are in the room, as they can validate the leave event for
they have access to the events it references.
XXX: There is also an open question here about who should be able to reject a
knock. To disinvite a user, perhaps counter-intuitively, you need to have a
high enough power level to kick users, rather than invite them. You also need
to have a higher power level than them. Should the same be done for knocking,
assuming the knocking user has the default power level?
### Membership change to `ban`
@ -105,6 +131,9 @@ allowed into the room.
If the user is unbanned, then knocks will be accepted again.
To ban the user, the client should call [`POST
/_matrix/client/r0/rooms/{roomId}/ban`](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-rooms-roomid-ban) with the user ID of the knocking user in the JSON body.
## Client-Server API
Two new endpoints are introduced in the Client-Server API (similarly to
@ -205,7 +234,7 @@ the room's name and avatar. A client will need this information to show a
nice representation of pending knocked rooms. The recommended events to
include are the join rules, canonical alias, avatar, and name of the room,
rather than all room state. This behaviour matches the information sent to
remote servers when invited their users to a room.
remote homeservers when invited their users to a room.
This prevents unneeded state from the room leaking out, and also speeds
things up (think not sending over hundreds of membership events from big
@ -337,8 +366,8 @@ This request was invalid, e.g. bad JSON. Example reply: