aboutsummaryrefslogtreecommitdiff
path: root/roomserver/auth
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-04-29 18:41:45 +0100
committerGitHub <noreply@github.com>2020-04-29 18:41:45 +0100
commit4ad52c67cacc21997f49decd57e3105beb8ab62d (patch)
treee6606ee4fa49b9e62940c04a287c68e81c2b0749 /roomserver/auth
parent458b3647815f0f2c6930611961431a9fb4390fba (diff)
Honour history_visibility when backfilling (#990)
* Make backfill work for shared history visibility * fetch missing state on backfill to remember snapshots correctly * Fix gmsl to not mux in auth events into room state * Whoops * Linting
Diffstat (limited to 'roomserver/auth')
-rw-r--r--roomserver/auth/auth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/roomserver/auth/auth.go b/roomserver/auth/auth.go
index 615a94b3..fdcf9f06 100644
--- a/roomserver/auth/auth.go
+++ b/roomserver/auth/auth.go
@@ -27,7 +27,7 @@ func IsServerAllowed(
serverCurrentlyInRoom bool,
authEvents []gomatrixserverlib.Event,
) bool {
- historyVisibility := historyVisibilityForRoom(authEvents)
+ historyVisibility := HistoryVisibilityForRoom(authEvents)
// 1. If the history_visibility was set to world_readable, allow.
if historyVisibility == "world_readable" {
@@ -52,7 +52,7 @@ func IsServerAllowed(
return false
}
-func historyVisibilityForRoom(authEvents []gomatrixserverlib.Event) string {
+func HistoryVisibilityForRoom(authEvents []gomatrixserverlib.Event) string {
// https://matrix.org/docs/spec/client_server/r0.6.0#id87
// By default if no history_visibility is set, or if the value is not understood, the visibility is assumed to be shared.
visibility := "shared"