From f964dd3ede38911e20feb8b1a3fac5c91b059ba4 Mon Sep 17 00:00:00 2001 From: Isaiah Inuwa Date: Sat, 21 Dec 2019 16:09:18 -0500 Subject: [PATCH] Remove presence lists. Presence lists were removed in 0.5.0. --- src/r0/presence.rs | 2 -- src/r0/presence/get_subscribed_presences.rs | 29 ------------------- .../presence/update_presence_subscriptions.rs | 29 ------------------- 3 files changed, 60 deletions(-) delete mode 100644 src/r0/presence/get_subscribed_presences.rs delete mode 100644 src/r0/presence/update_presence_subscriptions.rs diff --git a/src/r0/presence.rs b/src/r0/presence.rs index 47bb1eb6..38049dda 100644 --- a/src/r0/presence.rs +++ b/src/r0/presence.rs @@ -1,6 +1,4 @@ //! Endpoints for user presence. pub mod get_presence; -pub mod get_subscribed_presences; pub mod set_presence; -pub mod update_presence_subscriptions; diff --git a/src/r0/presence/get_subscribed_presences.rs b/src/r0/presence/get_subscribed_presences.rs deleted file mode 100644 index fc581989..00000000 --- a/src/r0/presence/get_subscribed_presences.rs +++ /dev/null @@ -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, - } -} diff --git a/src/r0/presence/update_presence_subscriptions.rs b/src/r0/presence/update_presence_subscriptions.rs deleted file mode 100644 index bf957425..00000000 --- a/src/r0/presence/update_presence_subscriptions.rs +++ /dev/null @@ -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, - /// A list of user IDs to add to the list. - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub invite: Vec, - /// The user whose presence state will be updated. - #[ruma_api(path)] - pub user_id: UserId, - } - - response {} -}