From c74b737fa53ba1eaff2d1c02bad3b2f378edfd79 Mon Sep 17 00:00:00 2001 From: Bernardo Yusti <50193612+itsuy@users.noreply.github.com> Date: Mon, 20 Jul 2020 16:40:23 -0700 Subject: [PATCH] Add logout_devices parameter to change_password::Request --- ruma-client-api/CHANGELOG.md | 1 + ruma-client-api/src/r0/account/change_password.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ruma-client-api/CHANGELOG.md b/ruma-client-api/CHANGELOG.md index 26ad6df9..bc0ad93d 100644 --- a/ruma-client-api/CHANGELOG.md +++ b/ruma-client-api/CHANGELOG.md @@ -39,6 +39,7 @@ Improvements: * Add a constructor for request structs of the followign endpoints * `r0::room::create_room` * `r0::message::get_message_events` +* Add `logout_devices` field to `r0::account::change_password` Deprecations: diff --git a/ruma-client-api/src/r0/account/change_password.rs b/ruma-client-api/src/r0/account/change_password.rs index efd83aa7..9bdbd7a2 100644 --- a/ruma-client-api/src/r0/account/change_password.rs +++ b/ruma-client-api/src/r0/account/change_password.rs @@ -18,6 +18,12 @@ ruma_api! { /// The new password for the account. pub new_password: String, + /// True to revoke the user's other access tokens, and their associated devices if the request succeeds. + /// Defaults to true. + /// When false, the server can still take advantage of the soft logout method for the user's remaining devices. + #[serde(default = "ruma_serde::default_true", skip_serializing_if = "ruma_serde::is_true")] + pub logout_devices: bool, + /// Additional authentication information for the user-interactive authentication API. pub auth: Option, }