mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 05:12:46 +00:00
Add more optimised code path for checking if we're in a room (#1909)
* Add more optimised code path for checking if we're in a room * Fix database queries * Fix federation API test * Fix logging * Review comments * Make separate API call for room membership
This commit is contained in:
parent
3e50bac944
commit
c8408a6387
10 changed files with 90 additions and 13 deletions
|
@ -170,7 +170,8 @@ type QueryMembershipsForRoomResponse struct {
|
|||
|
||||
// QueryServerJoinedToRoomRequest is a request to QueryServerJoinedToRoom
|
||||
type QueryServerJoinedToRoomRequest struct {
|
||||
// Server name of the server to find
|
||||
// Server name of the server to find. If not specified, we will
|
||||
// default to checking if the local server is joined.
|
||||
ServerName gomatrixserverlib.ServerName `json:"server_name"`
|
||||
// ID of the room to see if we are still joined to
|
||||
RoomID string `json:"room_id"`
|
||||
|
@ -182,7 +183,8 @@ type QueryServerJoinedToRoomResponse struct {
|
|||
RoomExists bool `json:"room_exists"`
|
||||
// True if we still believe that we are participating in the room
|
||||
IsInRoom bool `json:"is_in_room"`
|
||||
// List of servers that are also in the room
|
||||
// List of servers that are also in the room. This will not be populated
|
||||
// if the queried ServerName is the local server name.
|
||||
ServerNames []gomatrixserverlib.ServerName `json:"server_names"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue