aboutsummaryrefslogtreecommitdiff
path: root/roomserver/storage/interface.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2021-07-21 13:06:32 +0100
committerGitHub <noreply@github.com>2021-07-21 13:06:32 +0100
commitf0f8c7f0553b55c2e83400ca812b9d64bac00511 (patch)
tree1471dd8acc0e514dc0588f96884bc51cc6ab0a2d /roomserver/storage/interface.go
parent2f5e4f59916f9192721928ad2803edc7a6f5d9ac (diff)
Optimise QueryServerJoinedToRoom (#1933)
* Optimise checking if a server is in a room * Fix queries * Fix queries
Diffstat (limited to 'roomserver/storage/interface.go')
-rw-r--r--roomserver/storage/interface.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/roomserver/storage/interface.go b/roomserver/storage/interface.go
index c25820aa..62aa73ad 100644
--- a/roomserver/storage/interface.go
+++ b/roomserver/storage/interface.go
@@ -156,6 +156,8 @@ type Database interface {
JoinedUsersSetInRooms(ctx context.Context, roomIDs []string) (map[string]int, error)
// GetLocalServerInRoom returns true if we think we're in a given room or false otherwise.
GetLocalServerInRoom(ctx context.Context, roomNID types.RoomNID) (bool, error)
+ // GetServerInRoom returns true if we think a server is in a given room or false otherwise.
+ GetServerInRoom(ctx context.Context, roomNID types.RoomNID, serverName gomatrixserverlib.ServerName) (bool, error)
// GetKnownUsers searches all users that userID knows about.
GetKnownUsers(ctx context.Context, userID, searchString string, limit int) ([]string, error)
// GetKnownRooms returns a list of all rooms we know about.