explicitly fallback to None for invalid/empty room topics

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-01-16 21:25:08 -05:00 committed by June
parent 1f117582ca
commit 7eb57a9fd5
2 changed files with 2 additions and 2 deletions

View file

@ -247,7 +247,7 @@ pub(crate) async fn get_public_rooms_filtered_helper(
Error::bad_database("Invalid room topic event in database.")
})
})
.unwrap_or_default(),
.unwrap_or(None),
world_readable: services()
.rooms
.state_accessor

View file

@ -347,7 +347,7 @@ impl Service {
Error::bad_database("Invalid room topic event in database.")
})
})
.unwrap_or_default(),
.unwrap_or(None),
world_readable: services()
.rooms
.state_accessor