tuwunel_api/client/push/pushers.rs
1use axum::extract::State;
2use ruma::api::client::push::get_pushers;
3use tuwunel_core::Result;
4
5use crate::Ruma;
6
7/// # `GET /_matrix/client/r0/pushers`
8///
9/// Gets all currently active pushers for the sender user.
10pub(crate) async fn get_pushers_route(
11 State(services): State<crate::State>,
12 body: Ruma<get_pushers::v3::Request>,
13) -> Result<get_pushers::v3::Response> {
14 let sender_user = body.sender_user();
15
16 Ok(get_pushers::v3::Response {
17 pushers: services.pusher.get_pushers(sender_user).await,
18 })
19}