aboutsummaryrefslogtreecommitdiff
path: root/roomserver/storage
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2024-02-21 14:10:22 +0100
committerGitHub <noreply@github.com>2024-02-21 14:10:22 +0100
commitf4e77453cb082f594a36acdeecf36a738cfa8a40 (patch)
tree1bfe3ef7cb9bd31536515e7bda72845f63264417 /roomserver/storage
parent8f944f64349be6c434d5e47d9453c85db82d0144 (diff)
Speed up start up time by batch querying ACL events (#3334)
This should significantly speed up start up times on servers with many rooms.
Diffstat (limited to 'roomserver/storage')
-rw-r--r--roomserver/storage/tables/interface.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/roomserver/storage/tables/interface.go b/roomserver/storage/tables/interface.go
index 0ae064e6..b3cb3188 100644
--- a/roomserver/storage/tables/interface.go
+++ b/roomserver/storage/tables/interface.go
@@ -235,6 +235,10 @@ func ExtractContentValue(ev *types.HeaderedEvent) string {
key = "topic"
case "m.room.guest_access":
key = "guest_access"
+ case "m.room.server_acl":
+ // We need the entire content and not only one key, so we can use it
+ // on startup to generate the ACLs. This is merely a workaround.
+ return string(content)
}
result := gjson.GetBytes(content, key)
if !result.Exists() {