fix: bump ruma again to fix state res problems
This commit is contained in:
parent
8105c5cc60
commit
d3968c2fd1
6 changed files with 28 additions and 18 deletions
|
@ -104,6 +104,7 @@ pub async fn get_content_route(
|
|||
file,
|
||||
content_type,
|
||||
content_disposition,
|
||||
cross_origin_resource_policy: Some("cross-origin".to_owned()),
|
||||
})
|
||||
} else if &*body.server_name != services().globals.server_name() && body.allow_remote {
|
||||
let remote_content_response =
|
||||
|
@ -134,6 +135,7 @@ pub async fn get_content_as_filename_route(
|
|||
file,
|
||||
content_type,
|
||||
content_disposition: Some(format!("inline; filename={}", body.filename)),
|
||||
cross_origin_resource_policy: Some("cross-origin".to_owned()),
|
||||
})
|
||||
} else if &*body.server_name != services().globals.server_name() && body.allow_remote {
|
||||
let remote_content_response =
|
||||
|
@ -143,6 +145,7 @@ pub async fn get_content_as_filename_route(
|
|||
content_disposition: Some(format!("inline: filename={}", body.filename)),
|
||||
content_type: remote_content_response.content_type,
|
||||
file: remote_content_response.file,
|
||||
cross_origin_resource_policy: Some("cross-origin".to_owned()),
|
||||
})
|
||||
} else {
|
||||
Err(Error::BadRequest(ErrorKind::NotFound, "Media not found."))
|
||||
|
@ -174,7 +177,11 @@ pub async fn get_content_thumbnail_route(
|
|||
)
|
||||
.await?
|
||||
{
|
||||
Ok(get_content_thumbnail::v3::Response { file, content_type })
|
||||
Ok(get_content_thumbnail::v3::Response {
|
||||
file,
|
||||
content_type,
|
||||
cross_origin_resource_policy: Some("cross-origin".to_owned()),
|
||||
})
|
||||
} else if &*body.server_name != services().globals.server_name() && body.allow_remote {
|
||||
let get_thumbnail_response = services()
|
||||
.sending
|
||||
|
|
|
@ -127,8 +127,8 @@ pub async fn get_message_events_route(
|
|||
.map_err(|_| Error::BadRequest(ErrorKind::InvalidParam, "Invalid `from` value."))?,
|
||||
|
||||
None => match body.dir {
|
||||
get_message_events::v3::Direction::Forward => 0,
|
||||
get_message_events::v3::Direction::Backward => u64::MAX,
|
||||
ruma::api::client::Direction::Forward => 0,
|
||||
ruma::api::client::Direction::Backward => u64::MAX,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -151,7 +151,7 @@ pub async fn get_message_events_route(
|
|||
let mut lazy_loaded = HashSet::new();
|
||||
|
||||
match body.dir {
|
||||
get_message_events::v3::Direction::Forward => {
|
||||
ruma::api::client::Direction::Forward => {
|
||||
let events_after: Vec<_> = services()
|
||||
.rooms
|
||||
.timeline
|
||||
|
@ -196,7 +196,7 @@ pub async fn get_message_events_route(
|
|||
resp.end = next_token.map(|count| count.to_string());
|
||||
resp.chunk = events_after;
|
||||
}
|
||||
get_message_events::v3::Direction::Backward => {
|
||||
ruma::api::client::Direction::Backward => {
|
||||
let events_before: Vec<_> = services()
|
||||
.rooms
|
||||
.timeline
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::{services, Error, Result, Ruma};
|
||||
use ruma::{
|
||||
api::client::{error::ErrorKind, read_marker::set_read_marker, receipt::create_receipt},
|
||||
events::{receipt::ReceiptType, RoomAccountDataEventType},
|
||||
events::{receipt::{ReceiptType, ReceiptThread}, RoomAccountDataEventType},
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
};
|
||||
use std::collections::BTreeMap;
|
||||
|
@ -59,6 +59,7 @@ pub async fn set_read_marker_route(
|
|||
sender_user.clone(),
|
||||
ruma::events::receipt::Receipt {
|
||||
ts: Some(MilliSecondsSinceUnixEpoch::now()),
|
||||
thread: ReceiptThread::Unthreaded,
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -119,6 +120,7 @@ pub async fn create_receipt_route(
|
|||
sender_user.clone(),
|
||||
ruma::events::receipt::Receipt {
|
||||
ts: Some(MilliSecondsSinceUnixEpoch::now()),
|
||||
thread: ReceiptThread::Unthreaded,
|
||||
},
|
||||
);
|
||||
let mut receipts = BTreeMap::new();
|
||||
|
|
|
@ -778,6 +778,7 @@ async fn sync_helper(
|
|||
.collect(),
|
||||
},
|
||||
ephemeral: Ephemeral { events: edus },
|
||||
unread_thread_notifications: BTreeMap::new(),
|
||||
};
|
||||
|
||||
if !joined_room.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue