fix compilations
This commit is contained in:
parent
0ed1e42aed
commit
35b82d51cf
3 changed files with 19 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
use crate::{utils, Error, Result};
|
use crate::{utils, Error, Result};
|
||||||
use bytes::BytesMut;
|
use bytes::BytesMut;
|
||||||
use ruma::api::{IncomingResponse, OutgoingRequest, SendAccessToken};
|
use ruma::api::{IncomingResponse, MatrixVersion, OutgoingRequest, SendAccessToken};
|
||||||
use std::{fmt::Debug, mem, time::Duration};
|
use std::{fmt::Debug, mem, time::Duration};
|
||||||
use tracing::warn;
|
use tracing::warn;
|
||||||
|
|
||||||
|
@ -17,7 +17,11 @@ where
|
||||||
let hs_token = registration.get("hs_token").unwrap().as_str().unwrap();
|
let hs_token = registration.get("hs_token").unwrap().as_str().unwrap();
|
||||||
|
|
||||||
let mut http_request = request
|
let mut http_request = request
|
||||||
.try_into_http_request::<BytesMut>(destination, SendAccessToken::IfRequired(""))
|
.try_into_http_request::<BytesMut>(
|
||||||
|
destination,
|
||||||
|
SendAccessToken::IfRequired(""),
|
||||||
|
&[MatrixVersion::V1_0],
|
||||||
|
)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.map(|body| body.freeze());
|
.map(|body| body.freeze());
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use ruma::{
|
||||||
self,
|
self,
|
||||||
v1::{Device, Notification, NotificationCounts, NotificationPriority},
|
v1::{Device, Notification, NotificationCounts, NotificationPriority},
|
||||||
},
|
},
|
||||||
IncomingResponse, OutgoingRequest, SendAccessToken,
|
IncomingResponse, MatrixVersion, OutgoingRequest, SendAccessToken,
|
||||||
},
|
},
|
||||||
events::{
|
events::{
|
||||||
room::{name::RoomNameEventContent, power_levels::RoomPowerLevelsEventContent},
|
room::{name::RoomNameEventContent, power_levels::RoomPowerLevelsEventContent},
|
||||||
|
@ -101,7 +101,11 @@ where
|
||||||
let destination = destination.replace("/_matrix/push/v1/notify", "");
|
let destination = destination.replace("/_matrix/push/v1/notify", "");
|
||||||
|
|
||||||
let http_request = request
|
let http_request = request
|
||||||
.try_into_http_request::<BytesMut>(&destination, SendAccessToken::IfRequired(""))
|
.try_into_http_request::<BytesMut>(
|
||||||
|
&destination,
|
||||||
|
SendAccessToken::IfRequired(""),
|
||||||
|
&[MatrixVersion::V1_0],
|
||||||
|
)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
warn!("Failed to find destination {}: {}", destination, e);
|
warn!("Failed to find destination {}: {}", destination, e);
|
||||||
Error::BadServerResponse("Invalid destination")
|
Error::BadServerResponse("Invalid destination")
|
||||||
|
|
|
@ -34,7 +34,8 @@ use ruma::{
|
||||||
send_transaction_message,
|
send_transaction_message,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
EndpointError, IncomingResponse, OutgoingRequest, OutgoingResponse, SendAccessToken,
|
EndpointError, IncomingResponse, MatrixVersion, OutgoingRequest, OutgoingResponse,
|
||||||
|
SendAccessToken,
|
||||||
},
|
},
|
||||||
directory::{IncomingFilter, IncomingRoomNetwork},
|
directory::{IncomingFilter, IncomingRoomNetwork},
|
||||||
events::{
|
events::{
|
||||||
|
@ -155,7 +156,11 @@ where
|
||||||
let actual_destination_str = actual_destination.clone().into_https_string();
|
let actual_destination_str = actual_destination.clone().into_https_string();
|
||||||
|
|
||||||
let mut http_request = request
|
let mut http_request = request
|
||||||
.try_into_http_request::<Vec<u8>>(&actual_destination_str, SendAccessToken::IfRequired(""))
|
.try_into_http_request::<Vec<u8>>(
|
||||||
|
&actual_destination_str,
|
||||||
|
SendAccessToken::IfRequired(""),
|
||||||
|
&[MatrixVersion::V1_0],
|
||||||
|
)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
warn!(
|
warn!(
|
||||||
"Failed to find destination {}: {}",
|
"Failed to find destination {}: {}",
|
||||||
|
|
Loading…
Add table
Reference in a new issue