1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-04-08 15:24:00 +00:00
This commit is contained in:
David Blackman 2025-03-28 15:55:47 +00:00 committed by GitHub
commit 51cc2e23ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

1
changelog.d/18066.bugfix Normal file
View file

@ -0,0 +1 @@
Fixed a bug that caused new space-visible rooms to be hidden from the space hierarchy when any server modules are loaded.

View file

@ -21,6 +21,8 @@
import logging
from typing import TYPE_CHECKING, List, Mapping, Optional, Union
from immutabledict import immutabledict
from synapse import event_auth
from synapse.api.constants import (
EventTypes,
@ -326,13 +328,13 @@ class EventAuthHandler:
# If allowed is of the wrong form, then only allow invited users.
allow_list = join_rules_event.content.get("allow", [])
if not isinstance(allow_list, list):
if not isinstance(allow_list, (list, tuple)):
return ()
# Pull out the other room IDs, invalid data gets filtered.
result = []
for allow in allow_list:
if not isinstance(allow, dict):
if not isinstance(allow, (dict, immutabledict)):
continue
# If the type is unexpected, skip it.

View file

@ -955,7 +955,7 @@ class _RoomEntry:
def _has_valid_via(e: EventBase) -> bool:
via = e.content.get("via")
if not via or not isinstance(via, list):
if not via or not isinstance(via, (list, tuple)):
return False
for v in via:
if not isinstance(v, str):