abstract account-data deserializations for serde_json::from_elim
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
48a767d52c
commit
da34b43302
12 changed files with 133 additions and 210 deletions
|
@ -143,9 +143,8 @@ async fn set_room_tag(&self, room_id: &RoomId, user_id: &UserId, tag: &str) -> R
|
|||
let mut event = self
|
||||
.services
|
||||
.account_data
|
||||
.get(Some(room_id), user_id, RoomAccountDataEventType::Tag)
|
||||
.get_room(room_id, user_id, RoomAccountDataEventType::Tag)
|
||||
.await
|
||||
.and_then(|event| serde_json::from_str(event.get()).map_err(Into::into))
|
||||
.unwrap_or_else(|_| TagEvent {
|
||||
content: TagEventContent {
|
||||
tags: BTreeMap::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue