Include room name in desktop notifications (#326)

This commit is contained in:
Ulyssa 2024-08-17 01:03:13 -07:00 committed by GitHub
parent e63341fe32
commit b4fc574163
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 54 additions and 213 deletions

View file

@ -398,16 +398,26 @@ pub enum UserDisplayStyle {
DisplayName,
}
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum NotifyVia {
/// Deliver notifications via terminal bell.
Bell,
/// Deliver notifications via desktop mechanism.
#[default]
#[cfg(feature = "desktop")]
Desktop,
}
impl Default for NotifyVia {
fn default() -> Self {
#[cfg(not(feature = "desktop"))]
return NotifyVia::Bell;
#[cfg(feature = "desktop")]
return NotifyVia::Desktop;
}
}
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)]
pub struct Notifications {
#[serde(default)]