mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Add command to set per-room notification levels (#305)
This commit is contained in:
parent
b4fc574163
commit
2a66496913
4 changed files with 135 additions and 1 deletions
10
src/base.rs
10
src/base.rs
|
@ -378,6 +378,9 @@ pub enum RoomField {
|
|||
/// The room topic.
|
||||
Topic,
|
||||
|
||||
/// Notification level.
|
||||
NotificationMode,
|
||||
|
||||
/// The room's entire list of alternative aliases.
|
||||
Aliases,
|
||||
|
||||
|
@ -612,6 +615,10 @@ pub type MessageReactions = HashMap<OwnedEventId, (String, OwnedUserId)>;
|
|||
/// Errors encountered during application use.
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
pub enum IambError {
|
||||
/// An invalid notification level was specified.
|
||||
#[error("Invalid notification level: {0}")]
|
||||
InvalidNotificationLevel(String),
|
||||
|
||||
/// An invalid user identifier was specified.
|
||||
#[error("Invalid user identifier: {0}")]
|
||||
InvalidUserId(String),
|
||||
|
@ -691,6 +698,9 @@ pub enum IambError {
|
|||
#[error("Verification request error: {0}")]
|
||||
VerificationRequestError(#[from] matrix_sdk::encryption::identities::RequestVerificationError),
|
||||
|
||||
#[error("Notification setting error: {0}")]
|
||||
NotificationSettingError(#[from] matrix_sdk::NotificationSettingsError),
|
||||
|
||||
/// A failure related to images.
|
||||
#[error("Image error: {0}")]
|
||||
Image(#[from] image::ImageError),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue