From 4b05e7e361eb99235448fdbd8fabec8174f796c7 Mon Sep 17 00:00:00 2001 From: Isaiah Inuwa Date: Tue, 25 Feb 2020 19:57:48 -0600 Subject: [PATCH] Add request and response parameters for account deactiviation --- CHANGELOG.md | 1 + src/r0/account/deactivate.rs | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5479e03c..3388b2aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Improvements: * Add endpoints to retrieve account_data (introduced in r0.5.0) * Add media endpoints: `r0::media::{get_media_config, get_media_preview, get_content_as_filename}` * Add `unstable_features` to `unversioned::get_supported_versions` (introduced in r0.5.0) +* Add request and response parameters for `r0::account::deactivate` Breaking changes: diff --git a/src/r0/account/deactivate.rs b/src/r0/account/deactivate.rs index 99fa8fcc..6e982bf3 100644 --- a/src/r0/account/deactivate.rs +++ b/src/r0/account/deactivate.rs @@ -1,8 +1,9 @@ -//! [POST /_matrix/client/r0/account/deactivate](https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-client-r0-account-deactivate) -// TODO: missing request parameters +//! [POST /_matrix/client/r0/account/deactivate](https://matrix.org/docs/spec/client_server/r0.6.0.html#post-matrix-client-r0-account-deactivate) use ruma_api::ruma_api; +use super::{AuthenticationData, ThirdPartyIdRemovalStatus}; + ruma_api! { metadata { description: "Deactivate the current user's account.", @@ -13,7 +14,18 @@ ruma_api! { requires_authentication: true, } - request {} + request { + /// Additional authentication information for the user-interactive authentication API. + #[serde(skip_serializing_if = "Option::is_none")] + auth: Option, + /// Identity server from which to unbind the user's third party + /// identifier. + #[serde(skip_serializing_if = "Option::is_none")] + id_server: Option, + } - response {} + response { + /// Result of unbind operation. + id_server_unbind_result: ThirdPartyIdRemovalStatus + } }