client-api: Add M_DUPLICATE_ANNOTATION error kind
According to MSC2677
This commit is contained in:
parent
cb512f01d6
commit
af2407e98a
@ -150,6 +150,10 @@ pub enum ErrorKind {
|
|||||||
/// M_BAD_ALIAS
|
/// M_BAD_ALIAS
|
||||||
BadAlias,
|
BadAlias,
|
||||||
|
|
||||||
|
/// M_DUPLICATE_ANNOTATION
|
||||||
|
#[cfg(feature = "unstable-msc2677")]
|
||||||
|
DuplicateAnnotation,
|
||||||
|
|
||||||
/// FI.MAU.MSC2246_NOT_YET_UPLOADED
|
/// FI.MAU.MSC2246_NOT_YET_UPLOADED
|
||||||
#[cfg(feature = "unstable-msc2246")]
|
#[cfg(feature = "unstable-msc2246")]
|
||||||
NotYetUploaded,
|
NotYetUploaded,
|
||||||
@ -209,6 +213,8 @@ impl AsRef<str> for ErrorKind {
|
|||||||
Self::UnableToAuthorizeJoin => "M_UNABLE_TO_AUTHORISE_JOIN",
|
Self::UnableToAuthorizeJoin => "M_UNABLE_TO_AUTHORISE_JOIN",
|
||||||
Self::UnableToGrantJoin => "M_UNABLE_TO_GRANT_JOIN",
|
Self::UnableToGrantJoin => "M_UNABLE_TO_GRANT_JOIN",
|
||||||
Self::BadAlias => "M_BAD_ALIAS",
|
Self::BadAlias => "M_BAD_ALIAS",
|
||||||
|
#[cfg(feature = "unstable-msc2677")]
|
||||||
|
Self::DuplicateAnnotation => "M_DUPLICATE_ANNOTATION",
|
||||||
#[cfg(feature = "unstable-msc2246")]
|
#[cfg(feature = "unstable-msc2246")]
|
||||||
Self::NotYetUploaded => "FI.MAU.MSC2246_NOT_YET_UPLOADED",
|
Self::NotYetUploaded => "FI.MAU.MSC2246_NOT_YET_UPLOADED",
|
||||||
#[cfg(feature = "unstable-msc2246")]
|
#[cfg(feature = "unstable-msc2246")]
|
||||||
|
@ -206,6 +206,8 @@ impl<'de> Visitor<'de> for ErrorKindVisitor {
|
|||||||
},
|
},
|
||||||
ErrCode::CannotLeaveServerNoticeRoom => ErrorKind::CannotLeaveServerNoticeRoom,
|
ErrCode::CannotLeaveServerNoticeRoom => ErrorKind::CannotLeaveServerNoticeRoom,
|
||||||
ErrCode::WeakPassword => ErrorKind::WeakPassword,
|
ErrCode::WeakPassword => ErrorKind::WeakPassword,
|
||||||
|
#[cfg(feature = "unstable-msc2677")]
|
||||||
|
ErrCode::DuplicateAnnotation => ErrorKind::DuplicateAnnotation,
|
||||||
#[cfg(feature = "unstable-msc2246")]
|
#[cfg(feature = "unstable-msc2246")]
|
||||||
ErrCode::NotYetUploaded => ErrorKind::NotYetUploaded,
|
ErrCode::NotYetUploaded => ErrorKind::NotYetUploaded,
|
||||||
#[cfg(feature = "unstable-msc2246")]
|
#[cfg(feature = "unstable-msc2246")]
|
||||||
@ -253,6 +255,8 @@ enum ErrCode {
|
|||||||
ResourceLimitExceeded,
|
ResourceLimitExceeded,
|
||||||
CannotLeaveServerNoticeRoom,
|
CannotLeaveServerNoticeRoom,
|
||||||
WeakPassword,
|
WeakPassword,
|
||||||
|
#[cfg(feature = "unstable-msc2677")]
|
||||||
|
DuplicateAnnotation,
|
||||||
#[cfg(feature = "unstable-msc2246")]
|
#[cfg(feature = "unstable-msc2246")]
|
||||||
#[ruma_enum(rename = "FI.MAU.MSC2246_NOT_YET_UPLOADED", alias = "M_NOT_YET_UPLOADED")]
|
#[ruma_enum(rename = "FI.MAU.MSC2246_NOT_YET_UPLOADED", alias = "M_NOT_YET_UPLOADED")]
|
||||||
NotYetUploaded,
|
NotYetUploaded,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user