mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Implement set/unset/show for alternative and canonical aliases (#279)
This commit is contained in:
parent
9a1adfb287
commit
4571788678
4 changed files with 277 additions and 2 deletions
20
src/base.rs
20
src/base.rs
|
@ -369,6 +369,15 @@ pub enum RoomField {
|
|||
|
||||
/// The room topic.
|
||||
Topic,
|
||||
|
||||
/// The room's entire list of alternative aliases.
|
||||
Aliases,
|
||||
|
||||
/// A specific alternative alias to the room.
|
||||
Alias(String),
|
||||
|
||||
/// The room's canonical alias.
|
||||
CanonicalAlias,
|
||||
}
|
||||
|
||||
/// An action that operates on a focused room.
|
||||
|
@ -397,6 +406,9 @@ pub enum RoomAction {
|
|||
|
||||
/// Unset a room property.
|
||||
Unset(RoomField),
|
||||
|
||||
/// List the values in a list room property.
|
||||
Show(RoomField),
|
||||
}
|
||||
|
||||
/// An action that sends a message to a room.
|
||||
|
@ -596,6 +608,10 @@ pub enum IambError {
|
|||
#[error("Invalid user identifier: {0}")]
|
||||
InvalidUserId(String),
|
||||
|
||||
/// An invalid user identifier was specified.
|
||||
#[error("Invalid room alias: {0}")]
|
||||
InvalidRoomAlias(String),
|
||||
|
||||
/// An invalid verification identifier was specified.
|
||||
#[error("Invalid verification user/device pair: {0}")]
|
||||
InvalidVerificationId(String),
|
||||
|
@ -659,6 +675,10 @@ pub enum IambError {
|
|||
#[error("Unknown room identifier: {0}")]
|
||||
UnknownRoom(OwnedRoomId),
|
||||
|
||||
/// An invalid room alias id was specified.
|
||||
#[error("Invalid room alias id: {0}")]
|
||||
InvalidRoomAliasId(#[from] matrix_sdk::ruma::IdParseError),
|
||||
|
||||
/// A failure occurred during verification.
|
||||
#[error("Verification request error: {0}")]
|
||||
VerificationRequestError(#[from] matrix_sdk::encryption::identities::RequestVerificationError),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue