rename misleading sender_servername to origin
this is the X-Matrix origin/server, NOT the `"sender"`` user's server name. Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -119,7 +119,7 @@ where
|
||||
|
||||
let mut json_body = serde_json::from_slice::<CanonicalJsonValue>(&body).ok();
|
||||
|
||||
let (sender_user, sender_device, sender_servername, appservice_info) = match (metadata.authentication, token) {
|
||||
let (sender_user, sender_device, origin, appservice_info) = match (metadata.authentication, token) {
|
||||
(_, Token::Invalid) => {
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::UnknownToken {
|
||||
@@ -322,7 +322,7 @@ where
|
||||
body,
|
||||
sender_user,
|
||||
sender_device,
|
||||
sender_servername,
|
||||
origin,
|
||||
json_body,
|
||||
appservice_info,
|
||||
})
|
||||
|
||||
@@ -9,10 +9,12 @@ use crate::service::appservice::RegistrationInfo;
|
||||
|
||||
/// Extractor for Ruma request structs
|
||||
pub(crate) struct Ruma<T> {
|
||||
/// Request struct body
|
||||
pub(crate) body: T,
|
||||
pub(crate) sender_user: Option<OwnedUserId>,
|
||||
pub(crate) sender_device: Option<OwnedDeviceId>,
|
||||
pub(crate) sender_servername: Option<OwnedServerName>,
|
||||
/// X-Matrix origin/server
|
||||
pub(crate) origin: Option<OwnedServerName>,
|
||||
pub(crate) json_body: Option<CanonicalJsonValue>, // This is None when body is not a valid string
|
||||
pub(crate) appservice_info: Option<RegistrationInfo>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user