From f2e588b2945622432704223383332961f3c7ae11 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Mon, 5 Jan 2026 18:14:16 +0000 Subject: [PATCH] fix: Stop forcing the appservice token into the URL --- src/service/sending/appservice.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/service/sending/appservice.rs b/src/service/sending/appservice.rs index 6a92b6be2..0554372da 100644 --- a/src/service/sending/appservice.rs +++ b/src/service/sending/appservice.rs @@ -32,7 +32,7 @@ where trace!("Appservice URL \"{dest}\", Appservice ID: {}", registration.id); let hs_token = registration.hs_token.as_str(); - let mut http_request = request + let http_request = request .try_into_http_request::( &dest, SendAccessToken::Appservice(hs_token), @@ -45,17 +45,6 @@ where })? .map(BytesMut::freeze); - let mut parts = http_request.uri().clone().into_parts(); - let old_path_and_query = parts.path_and_query.unwrap().as_str().to_owned(); - let symbol = if old_path_and_query.contains('?') { "&" } else { "?" }; - - parts.path_and_query = Some( - (old_path_and_query + symbol + "access_token=" + hs_token) - .parse() - .unwrap(), - ); - *http_request.uri_mut() = parts.try_into().expect("our manipulation is always valid"); - let reqwest_request = reqwest::Request::try_from(http_request)?; let client = &self.services.client.appservice;