1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-08-06 17:40:59 +00:00

refactor: set send_request matrix versions in a single constant

This commit is contained in:
Matthias Ahouansou 2025-03-08 13:19:45 +00:00
parent 42d8e88c74
commit 4dc15a4605
No known key found for this signature in database
4 changed files with 11 additions and 12 deletions

View file

@ -1,8 +1,6 @@
use crate::{services, utils, Error, Result};
use crate::{services, utils, Error, Result, MATRIX_VERSIONS};
use bytes::BytesMut;
use ruma::api::{
appservice::Registration, IncomingResponse, MatrixVersion, OutgoingRequest, SendAccessToken,
};
use ruma::api::{appservice::Registration, IncomingResponse, OutgoingRequest, SendAccessToken};
use std::{fmt::Debug, mem, time::Duration};
use tracing::warn;
@ -30,7 +28,7 @@ where
.try_into_http_request::<BytesMut>(
&destination,
SendAccessToken::IfRequired(hs_token),
&[MatrixVersion::V1_0],
MATRIX_VERSIONS,
)
.unwrap()
.map(|body| body.freeze());