mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 16:51:24 +01:00
rename RumaResponse to Ra
It's very commonly used so having a short name is worthwhile, I think.
This commit is contained in:
parent
230ebd3884
commit
7ea98dac72
38 changed files with 332 additions and 351 deletions
|
|
@ -14,7 +14,7 @@ use ruma::{
|
|||
|
||||
use crate::{
|
||||
service::{pdu::PduBuilder, rooms::timeline::PduCount},
|
||||
services, utils, Error, Result, Ruma, RumaResponse,
|
||||
services, utils, Error, Ra, Result, Ruma,
|
||||
};
|
||||
|
||||
/// # `PUT /_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}`
|
||||
|
|
@ -28,7 +28,7 @@ use crate::{
|
|||
/// allowed
|
||||
pub(crate) async fn send_message_event_route(
|
||||
body: Ruma<send_message_event::v3::Request>,
|
||||
) -> Result<RumaResponse<send_message_event::v3::Response>> {
|
||||
) -> Result<Ra<send_message_event::v3::Response>> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
let sender_device = body.sender_device.as_deref();
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ pub(crate) async fn send_message_event_route(
|
|||
.map_err(|_| {
|
||||
Error::bad_database("Invalid event id in txnid data.")
|
||||
})?;
|
||||
return Ok(RumaResponse(send_message_event::v3::Response {
|
||||
return Ok(Ra(send_message_event::v3::Response {
|
||||
event_id,
|
||||
}));
|
||||
}
|
||||
|
|
@ -118,9 +118,7 @@ pub(crate) async fn send_message_event_route(
|
|||
|
||||
drop(state_lock);
|
||||
|
||||
Ok(RumaResponse(send_message_event::v3::Response::new(
|
||||
(*event_id).to_owned(),
|
||||
)))
|
||||
Ok(Ra(send_message_event::v3::Response::new((*event_id).to_owned())))
|
||||
}
|
||||
|
||||
/// # `GET /_matrix/client/r0/rooms/{roomId}/messages`
|
||||
|
|
@ -133,7 +131,7 @@ pub(crate) async fn send_message_event_route(
|
|||
#[allow(clippy::too_many_lines)]
|
||||
pub(crate) async fn get_message_events_route(
|
||||
body: Ruma<get_message_events::v3::Request>,
|
||||
) -> Result<RumaResponse<get_message_events::v3::Response>> {
|
||||
) -> Result<Ra<get_message_events::v3::Response>> {
|
||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
let sender_device =
|
||||
body.sender_device.as_ref().expect("user is authenticated");
|
||||
|
|
@ -310,5 +308,5 @@ pub(crate) async fn get_message_events_route(
|
|||
}
|
||||
*/
|
||||
|
||||
Ok(RumaResponse(resp))
|
||||
Ok(Ra(resp))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue