mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-08-16 18:01:35 +00:00
parent
b8cb2bc824
commit
b05b9ed6ac
10 changed files with 95 additions and 76 deletions
|
@ -459,7 +459,8 @@ fn add_unsigned_device_display_name(
|
|||
metadata: ruma::api::client::device::Device,
|
||||
) -> serde_json::Result<()> {
|
||||
if let Some(display_name) = metadata.display_name {
|
||||
let mut object = keys.deserialize_as::<serde_json::Map<String, serde_json::Value>>()?;
|
||||
let mut object =
|
||||
keys.deserialize_as_unchecked::<serde_json::Map<String, serde_json::Value>>()?;
|
||||
|
||||
let unsigned = object.entry("unsigned").or_insert_with(|| json!({}));
|
||||
if let serde_json::Value::Object(unsigned_object) = unsigned {
|
||||
|
|
|
@ -145,7 +145,7 @@ pub async fn create_room_route(
|
|||
let content = match &body.creation_content {
|
||||
Some(content) => {
|
||||
let mut content = content
|
||||
.deserialize_as::<CanonicalJsonObject>()
|
||||
.deserialize_as_unchecked::<CanonicalJsonObject>()
|
||||
.expect("Invalid creation content");
|
||||
|
||||
if !rules.use_room_create_sender {
|
||||
|
|
|
@ -593,7 +593,7 @@ async fn sync_helper(
|
|||
account_data: GlobalAccountData {
|
||||
events: services()
|
||||
.account_data
|
||||
.changes_since(None, &sender_user, since)?
|
||||
.global_changes_since(&sender_user, since)?
|
||||
.into_iter()
|
||||
.filter_map(|(_, v)| {
|
||||
serde_json::from_str(v.json().get())
|
||||
|
@ -1165,7 +1165,7 @@ async fn load_joined_room(
|
|||
account_data: RoomAccountData {
|
||||
events: services()
|
||||
.account_data
|
||||
.changes_since(Some(room_id), sender_user, since)?
|
||||
.room_changes_since(room_id, sender_user, since)?
|
||||
.into_iter()
|
||||
.filter_map(|(_, v)| {
|
||||
serde_json::from_str(v.json().get())
|
||||
|
@ -1806,7 +1806,7 @@ pub async fn sync_events_v5_route(
|
|||
global: if body.extensions.account_data.enabled.unwrap_or(false) {
|
||||
services()
|
||||
.account_data
|
||||
.changes_since(None, &sender_user, globalsince)?
|
||||
.global_changes_since(&sender_user, globalsince)?
|
||||
.into_iter()
|
||||
.filter_map(|(_, v)| {
|
||||
serde_json::from_str(v.json().get())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue