Skip to content
Snippets Groups Projects
Unverified Commit 8df2a1a0 authored by timokoesters's avatar timokoesters
Browse files

improvement: add room topic to public room dir

parent e0fccffd
No related branches found
No related tags found
No related merge requests found
......@@ -1203,7 +1203,11 @@ pub async fn get_public_rooms_route(
.map(|n| n.to_owned()),
num_joined_members: (db.rooms.room_members(&room_id).count() as u32).into(),
room_id,
topic: None,
topic: state
.get(&(EventType::RoomTopic, "".to_owned()))
.and_then(|s| s.content.get("topic"))
.and_then(|n| n.as_str())
.map(|n| n.to_owned()),
world_readable: false,
guest_can_join: true,
avatar_url: None,
......@@ -1243,7 +1247,11 @@ pub async fn get_public_rooms_filtered_route(
.map(|n| n.to_owned()),
num_joined_members: (db.rooms.room_members(&room_id).count() as u32).into(),
room_id,
topic: None,
topic: state
.get(&(EventType::RoomTopic, "".to_owned()))
.and_then(|s| s.content.get("topic"))
.and_then(|n| n.as_str())
.map(|n| n.to_owned()),
world_readable: false,
guest_can_join: true,
avatar_url: None,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment