mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 12:46:49 +00:00
abstract account-data deserializations for serde_json::from_elim
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
48a767d52c
commit
da34b43302
12 files changed
+133
-210
No files matched your search
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user