mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 22:02:46 +00:00
Reject make_join for empty rooms (#1439)
* Sanity-check room version on RS event input * Update gomatrixserverlib * Reject make_join when no room members are left * Revert some changes from wrong branch * Distinguish between room not existing and room being abandoned on this server * nolint
This commit is contained in:
parent
a6700331ce
commit
3013ade84f
9 changed files with 139 additions and 0 deletions
|
@ -140,6 +140,22 @@ type QueryMembershipsForRoomResponse struct {
|
|||
HasBeenInRoom bool `json:"has_been_in_room"`
|
||||
}
|
||||
|
||||
// QueryServerJoinedToRoomRequest is a request to QueryServerJoinedToRoom
|
||||
type QueryServerJoinedToRoomRequest struct {
|
||||
// Server name of the server to find
|
||||
ServerName gomatrixserverlib.ServerName `json:"server_name"`
|
||||
// ID of the room to see if we are still joined to
|
||||
RoomID string `json:"room_id"`
|
||||
}
|
||||
|
||||
// QueryMembershipsForRoomResponse is a response to QueryServerJoinedToRoom
|
||||
type QueryServerJoinedToRoomResponse struct {
|
||||
// True if the room exists on the server
|
||||
RoomExists bool `json:"room_exists"`
|
||||
// True if we still believe that we are participating in the room
|
||||
IsInRoom bool `json:"is_in_room"`
|
||||
}
|
||||
|
||||
// QueryServerAllowedToSeeEventRequest is a request to QueryServerAllowedToSeeEvent
|
||||
type QueryServerAllowedToSeeEventRequest struct {
|
||||
// The event ID to look up invites in.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue