base: Store the room topic with the room summary.

master
Damir Jelić 2020-11-24 10:56:43 +01:00
parent c13d04ae18
commit 64fff933af
1 changed files with 6 additions and 0 deletions

View File

@ -155,6 +155,7 @@ impl Room {
name: None, name: None,
canonical_alias: None, canonical_alias: None,
avatar_url: None, avatar_url: None,
topic: None,
})), })),
} }
} }
@ -326,6 +327,7 @@ pub struct InnerSummary {
name: Option<String>, name: Option<String>,
canonical_alias: Option<RoomAliasId>, canonical_alias: Option<RoomAliasId>,
avatar_url: Option<String>, avatar_url: Option<String>,
topic: Option<String>,
summary: SomeSummary, summary: SomeSummary,
members_synced: bool, members_synced: bool,
@ -379,6 +381,10 @@ impl InnerSummary {
self.canonical_alias = a.content.alias.clone(); self.canonical_alias = a.content.alias.clone();
true true
} }
AnySyncStateEvent::RoomTopic(t) => {
self.topic = Some(t.content.topic.clone());
true
}
_ => false, _ => false,
} }
} }