client-api: Add ErrorKind::UserSuspended
According to MSC3823
This commit is contained in:
parent
4a9dfc7b30
commit
3ca8adaadf
@ -9,6 +9,7 @@ Improvements:
|
|||||||
variable, or inside `.cargo/config.toml`. It can also be enabled by setting
|
variable, or inside `.cargo/config.toml`. It can also be enabled by setting
|
||||||
the `RUMA_UNSTABLE_EXHAUSTIVE_TYPES` environment variable.
|
the `RUMA_UNSTABLE_EXHAUSTIVE_TYPES` environment variable.
|
||||||
- Add `ErrorKind::ThreepidMediumNotSupported`, according to MSC4178.
|
- Add `ErrorKind::ThreepidMediumNotSupported`, according to MSC4178.
|
||||||
|
- Add `ErrorKind::UserSuspended`, according to MSC3823.
|
||||||
|
|
||||||
# 0.19.0
|
# 0.19.0
|
||||||
|
|
||||||
|
@ -223,6 +223,9 @@ pub enum ErrorKind {
|
|||||||
/// M_USER_LOCKED
|
/// M_USER_LOCKED
|
||||||
UserLocked,
|
UserLocked,
|
||||||
|
|
||||||
|
/// M_USER_SUSPENDED
|
||||||
|
UserSuspended,
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
_Custom { errcode: PrivOwnedStr, extra: Extra },
|
_Custom { errcode: PrivOwnedStr, extra: Extra },
|
||||||
}
|
}
|
||||||
@ -305,6 +308,7 @@ impl AsRef<str> for ErrorKind {
|
|||||||
#[cfg(feature = "unstable-msc3843")]
|
#[cfg(feature = "unstable-msc3843")]
|
||||||
Self::Unactionable => "M_UNACTIONABLE",
|
Self::Unactionable => "M_UNACTIONABLE",
|
||||||
Self::UserLocked => "M_USER_LOCKED",
|
Self::UserLocked => "M_USER_LOCKED",
|
||||||
|
Self::UserSuspended => "M_USER_SUSPENDED",
|
||||||
Self::_Custom { errcode, .. } => &errcode.0,
|
Self::_Custom { errcode, .. } => &errcode.0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,6 +254,7 @@ impl<'de> Visitor<'de> for ErrorKindVisitor {
|
|||||||
#[cfg(feature = "unstable-msc3843")]
|
#[cfg(feature = "unstable-msc3843")]
|
||||||
ErrCode::Unactionable => ErrorKind::Unactionable,
|
ErrCode::Unactionable => ErrorKind::Unactionable,
|
||||||
ErrCode::UserLocked => ErrorKind::UserLocked,
|
ErrCode::UserLocked => ErrorKind::UserLocked,
|
||||||
|
ErrCode::UserSuspended => ErrorKind::UserSuspended,
|
||||||
ErrCode::_Custom(errcode) => ErrorKind::_Custom { errcode, extra },
|
ErrCode::_Custom(errcode) => ErrorKind::_Custom { errcode, extra },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -314,6 +315,7 @@ enum ErrCode {
|
|||||||
#[cfg(feature = "unstable-msc3843")]
|
#[cfg(feature = "unstable-msc3843")]
|
||||||
Unactionable,
|
Unactionable,
|
||||||
UserLocked,
|
UserLocked,
|
||||||
|
UserSuspended,
|
||||||
_Custom(PrivOwnedStr),
|
_Custom(PrivOwnedStr),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user