fix(spaces): Expose restricted children over federation

This commit is contained in:
Erwan Leboucher committed 2026-08-14 12:51:09 +02:00
1 parent 5c59acc380
commit 918070c512
2 files changed
+18

No files matched your search

+1
View File
@@ -0,0 +1 @@
Fixed federated space hierarchies omitting rooms restricted to members of private spaces. Contributed by @eleboucher.
+17
View File
@@ -598,6 +598,23 @@ impl Service {
return true;
}
// For restricted rooms, federation responses must include the summary when
// a user on the querying server can satisfy one of the join conditions.
if let JoinRuleSummary::Restricted(RestrictedSummary { allowed_room_ids, .. }) =
&summary.join_rule
{
for room_id in allowed_room_ids {
if self
.services
.state_cache
.server_in_room(querying_server, room_id)
.await
{
return true;
}
}
}
// If the server isn't in the room, the same visibility rules apply as for
// anonymous summary requests.
self.user_may_see_summary(None, summary).await