aboutsummaryrefslogtreecommitdiff
path: root/roomserver/acls
diff options
context:
space:
mode:
Diffstat (limited to 'roomserver/acls')
-rw-r--r--roomserver/acls/acls.go6
-rw-r--r--roomserver/acls/acls_test.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/roomserver/acls/acls.go b/roomserver/acls/acls.go
index 017682e0..4950e623 100644
--- a/roomserver/acls/acls.go
+++ b/roomserver/acls/acls.go
@@ -32,8 +32,8 @@ import (
const MRoomServerACL = "m.room.server_acl"
type ServerACLDatabase interface {
- // GetKnownRooms returns a list of all rooms we know about.
- GetKnownRooms(ctx context.Context) ([]string, error)
+ // RoomsWithACLs returns all room IDs for rooms with ACLs
+ RoomsWithACLs(ctx context.Context) ([]string, error)
// GetBulkStateContent returns all state events which match a given room ID and a given state key tuple. Both must be satisfied for a match.
// If a tuple has the StateKey of '*' and allowWildcards=true then all state events with the EventType should be returned.
@@ -57,7 +57,7 @@ func NewServerACLs(db ServerACLDatabase) *ServerACLs {
}
// Look up all of the rooms that the current state server knows about.
- rooms, err := db.GetKnownRooms(ctx)
+ rooms, err := db.RoomsWithACLs(ctx)
if err != nil {
logrus.WithError(err).Fatalf("Failed to get known rooms")
}
diff --git a/roomserver/acls/acls_test.go b/roomserver/acls/acls_test.go
index efe1d209..09920308 100644
--- a/roomserver/acls/acls_test.go
+++ b/roomserver/acls/acls_test.go
@@ -116,7 +116,7 @@ var (
type dummyACLDB struct{}
-func (d dummyACLDB) GetKnownRooms(ctx context.Context) ([]string, error) {
+func (d dummyACLDB) RoomsWithACLs(ctx context.Context) ([]string, error) {
return []string{"1", "2"}, nil
}