rename RumaResponse to Ra

It's very commonly used so having a short name is worthwhile, I think.
This commit is contained in:
Charles Hall 2024-05-18 18:59:46 -07:00
parent 230ebd3884
commit 7ea98dac72
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
38 changed files with 332 additions and 351 deletions

View file

@ -8,14 +8,14 @@ use ruma::{
to_device::DeviceIdOrAllDevices,
};
use crate::{services, Error, Result, Ruma, RumaResponse};
use crate::{services, Error, Ra, Result, Ruma};
/// # `PUT /_matrix/client/r0/sendToDevice/{eventType}/{txnId}`
///
/// Send a to-device event to a set of client devices.
pub(crate) async fn send_event_to_device_route(
body: Ruma<send_event_to_device::v3::Request>,
) -> Result<RumaResponse<send_event_to_device::v3::Response>> {
) -> Result<Ra<send_event_to_device::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
let sender_device = body.sender_device.as_deref();
@ -25,7 +25,7 @@ pub(crate) async fn send_event_to_device_route(
.existing_txnid(sender_user, sender_device, &body.txn_id)?
.is_some()
{
return Ok(RumaResponse(send_event_to_device::v3::Response {}));
return Ok(Ra(send_event_to_device::v3::Response {}));
}
for (target_user_id, map) in &body.messages {
@ -103,5 +103,5 @@ pub(crate) async fn send_event_to_device_route(
&[],
)?;
Ok(RumaResponse(send_event_to_device::v3::Response {}))
Ok(Ra(send_event_to_device::v3::Response {}))
}