rename Ruma to Ar

This follows the pattern of the previous commit.
This commit is contained in:
Charles Hall 2024-05-18 19:01:27 -07:00
parent 7ea98dac72
commit f8961d5578
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
37 changed files with 183 additions and 181 deletions

View file

@ -11,13 +11,13 @@ use ruma::{
push::{AnyPushRuleRef, InsertPushRuleError, RemovePushRuleError},
};
use crate::{services, Error, Ra, Result, Ruma};
use crate::{services, Ar, Error, Ra, Result};
/// # `GET /_matrix/client/r0/pushrules`
///
/// Retrieves the push rules event for this user.
pub(crate) async fn get_pushrules_all_route(
body: Ruma<get_pushrules_all::v3::Request>,
body: Ar<get_pushrules_all::v3::Request>,
) -> Result<Ra<get_pushrules_all::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -46,7 +46,7 @@ pub(crate) async fn get_pushrules_all_route(
///
/// Retrieves a single specified push rule for this user.
pub(crate) async fn get_pushrule_route(
body: Ruma<get_pushrule::v3::Request>,
body: Ar<get_pushrule::v3::Request>,
) -> Result<Ra<get_pushrule::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -84,7 +84,7 @@ pub(crate) async fn get_pushrule_route(
///
/// Creates a single specified push rule for this user.
pub(crate) async fn set_pushrule_route(
body: Ruma<set_pushrule::v3::Request>,
body: Ar<set_pushrule::v3::Request>,
) -> Result<Ra<set_pushrule::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
let body = body.body;
@ -164,7 +164,7 @@ pub(crate) async fn set_pushrule_route(
///
/// Gets the actions of a single specified push rule for this user.
pub(crate) async fn get_pushrule_actions_route(
body: Ruma<get_pushrule_actions::v3::Request>,
body: Ar<get_pushrule_actions::v3::Request>,
) -> Result<Ra<get_pushrule_actions::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -209,7 +209,7 @@ pub(crate) async fn get_pushrule_actions_route(
///
/// Sets the actions of a single specified push rule for this user.
pub(crate) async fn set_pushrule_actions_route(
body: Ruma<set_pushrule_actions::v3::Request>,
body: Ar<set_pushrule_actions::v3::Request>,
) -> Result<Ra<set_pushrule_actions::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -264,7 +264,7 @@ pub(crate) async fn set_pushrule_actions_route(
///
/// Gets the enabled status of a single specified push rule for this user.
pub(crate) async fn get_pushrule_enabled_route(
body: Ruma<get_pushrule_enabled::v3::Request>,
body: Ar<get_pushrule_enabled::v3::Request>,
) -> Result<Ra<get_pushrule_enabled::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -310,7 +310,7 @@ pub(crate) async fn get_pushrule_enabled_route(
///
/// Sets the enabled status of a single specified push rule for this user.
pub(crate) async fn set_pushrule_enabled_route(
body: Ruma<set_pushrule_enabled::v3::Request>,
body: Ar<set_pushrule_enabled::v3::Request>,
) -> Result<Ra<set_pushrule_enabled::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -365,7 +365,7 @@ pub(crate) async fn set_pushrule_enabled_route(
///
/// Deletes a single specified push rule for this user.
pub(crate) async fn delete_pushrule_route(
body: Ruma<delete_pushrule::v3::Request>,
body: Ar<delete_pushrule::v3::Request>,
) -> Result<Ra<delete_pushrule::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -425,7 +425,7 @@ pub(crate) async fn delete_pushrule_route(
///
/// Gets all currently active pushers for the sender user.
pub(crate) async fn get_pushers_route(
body: Ruma<get_pushers::v3::Request>,
body: Ar<get_pushers::v3::Request>,
) -> Result<Ra<get_pushers::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
@ -440,7 +440,7 @@ pub(crate) async fn get_pushers_route(
///
/// - TODO: Handle `append`
pub(crate) async fn set_pushers_route(
body: Ruma<set_pusher::v3::Request>,
body: Ar<set_pusher::v3::Request>,
) -> Result<Ra<set_pusher::v3::Response>> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");