Remove presence lists.

Presence lists were removed in 0.5.0.
This commit is contained in:
Isaiah Inuwa 2019-12-21 16:09:18 -05:00 committed by Jonas Platte
parent 69a8f35dbe
commit f964dd3ede
3 changed files with 0 additions and 60 deletions

View File

@ -1,6 +1,4 @@
//! Endpoints for user presence. //! Endpoints for user presence.
pub mod get_presence; pub mod get_presence;
pub mod get_subscribed_presences;
pub mod set_presence; pub mod set_presence;
pub mod update_presence_subscriptions;

View File

@ -1,29 +0,0 @@
//! [GET /_matrix/client/r0/presence/list/{userId}](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-presence-list-userid)
use ruma_api::ruma_api;
use ruma_events::{presence::PresenceEvent, EventResult};
use ruma_identifiers::UserId;
ruma_api! {
metadata {
description: "Get the precence status from the user's subscriptions.",
method: GET,
name: "get_subscribed_presences",
path: "/_matrix/client/r0/presence/list/:user_id",
rate_limited: false,
requires_authentication: true,
}
request {
/// The user whose presence state will be retrieved.
#[ruma_api(path)]
pub user_id: UserId,
}
response {
/// A list of presence events for every user on this list.
#[ruma_api(body)]
#[wrap_incoming(PresenceEvent with EventResult)]
pub presence_events: Vec<PresenceEvent>,
}
}

View File

@ -1,29 +0,0 @@
//! [POST /_matrix/client/r0/presence/list/{userId}](https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-client-r0-presence-list-userid)
use ruma_api::ruma_api;
use ruma_identifiers::UserId;
ruma_api! {
metadata {
description: "Update the presence subscriptions of the user.",
method: POST,
name: "update_presence_subscriptions",
path: "/_matrix/client/r0/presence/list/:user_id",
rate_limited: true,
requires_authentication: true,
}
request {
/// A list of user IDs to remove from the list.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub drop: Vec<UserId>,
/// A list of user IDs to add to the list.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub invite: Vec<UserId>,
/// The user whose presence state will be updated.
#[ruma_api(path)]
pub user_id: UserId,
}
response {}
}