allow non-joined users to get aliases of world_readable rooms
`user_can_see_state_events` checks if user is joined, or if room visibility is world_readable Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
380b61184d
commit
0863bec098
3 changed files with 14 additions and 6 deletions
|
@ -228,8 +228,13 @@ pub(crate) async fn get_public_rooms_filtered_helper(
|
|||
.map(|c: RoomHistoryVisibilityEventContent| {
|
||||
c.history_visibility == HistoryVisibility::WorldReadable
|
||||
})
|
||||
.map_err(|_| Error::bad_database("Invalid room history visibility event in database."))
|
||||
})?,
|
||||
.map_err(|e| {
|
||||
error!(
|
||||
"Invalid room history visibility event in database for room {}: {e}",
|
||||
&room_id
|
||||
);
|
||||
Error::bad_database("Invalid room history visibility event in database.")
|
||||
})})?,
|
||||
guest_can_join: services()
|
||||
.rooms
|
||||
.state_accessor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue