mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
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
This commit is contained in:
parent
458b364781
commit
4ad52c67ca
10 changed files with 195 additions and 52 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue