rooms: Add a method to get the room topic.

master
Damir Jelić 2021-01-03 16:52:47 +01:00
parent 0edef38eb7
commit 74998c8dd8
1 changed files with 4 additions and 0 deletions

View File

@ -235,6 +235,10 @@ impl Room {
self.inner.read().unwrap().is_encrypted() self.inner.read().unwrap().is_encrypted()
} }
pub fn topic(&self) -> Option<String> {
self.inner.read().unwrap().base_info.topic.clone()
}
pub fn update_summary(&self, summary: RoomInfo) { pub fn update_summary(&self, summary: RoomInfo) {
let mut inner = self.inner.write().unwrap(); let mut inner = self.inner.write().unwrap();
*inner = summary; *inner = summary;