From b5e660893ea2ee05df257b183eded5993b916139 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 17 Aug 2020 23:45:38 +0200 Subject: [PATCH] client-api: Add soft_logout field to ErrorKind::UnknownToken --- ruma-client-api/src/error.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ruma-client-api/src/error.rs b/ruma-client-api/src/error.rs index 0b3605f5..5fea2791 100644 --- a/ruma-client-api/src/error.rs +++ b/ruma-client-api/src/error.rs @@ -20,7 +20,14 @@ pub enum ErrorKind { /// M_UNKNOWN_TOKEN #[serde(rename = "M_UNKNOWN_TOKEN")] #[strum(to_string = "M_UNKNOWN_TOKEN")] - UnknownToken, + UnknownToken { + /// If this is `true`, the client can acquire a new access token by specifying the device ID + /// it is already using to the login API. For more information, see [the spec]. + /// + /// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#soft-logout + #[serde(default, skip_serializing_if = "ruma_serde::is_default")] + soft_logout: bool, + }, /// M_MISSING_TOKEN #[serde(rename = "M_MISSING_TOKEN")]