Add command to set per-room notification levels (#305)

This commit is contained in:
Tony 2024-08-17 23:43:19 +02:00 committed by GitHub
parent b4fc574163
commit 2a66496913
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 135 additions and 1 deletions

View file

@ -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),