diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2024-02-21 14:10:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 14:10:22 +0100 |
commit | f4e77453cb082f594a36acdeecf36a738cfa8a40 (patch) | |
tree | 1bfe3ef7cb9bd31536515e7bda72845f63264417 /roomserver/storage | |
parent | 8f944f64349be6c434d5e47d9453c85db82d0144 (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.go | 4 |
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() { |