@@ -49,12 +49,11 @@ impl Service {
|
||||
where
|
||||
T: OutgoingRequest + Debug,
|
||||
{
|
||||
let dest = dest.replace(services().globals.notification_push_path(), "");
|
||||
|
||||
trace!("Push gateway destination: {dest}");
|
||||
|
||||
const VERSIONS: [MatrixVersion; 1] = [MatrixVersion::V1_0];
|
||||
|
||||
let dest = dest.replace(services().globals.notification_push_path(), "");
|
||||
trace!("Push gateway destination: {dest}");
|
||||
|
||||
let http_request = request
|
||||
.try_into_http_request::<BytesMut>(&dest, SendAccessToken::IfRequired(""), &VERSIONS)
|
||||
.map_err(|e| {
|
||||
|
||||
@@ -14,6 +14,8 @@ pub(crate) async fn send_request<T>(registration: Registration, request: T) -> R
|
||||
where
|
||||
T: OutgoingRequest + Debug,
|
||||
{
|
||||
const VERSIONS: [MatrixVersion; 1] = [MatrixVersion::V1_0];
|
||||
|
||||
let Some(dest) = registration.url else {
|
||||
return Ok(None);
|
||||
};
|
||||
@@ -21,9 +23,6 @@ where
|
||||
trace!("Appservice URL \"{dest}\", Appservice ID: {}", registration.id);
|
||||
|
||||
let hs_token = registration.hs_token.as_str();
|
||||
|
||||
const VERSIONS: [MatrixVersion; 1] = [MatrixVersion::V1_0];
|
||||
|
||||
let mut http_request = request
|
||||
.try_into_http_request::<BytesMut>(&dest, SendAccessToken::IfRequired(hs_token), &VERSIONS)
|
||||
.map_err(|e| {
|
||||
|
||||
Reference in New Issue
Block a user