feat!: Made ntfy notification title required
This commit is contained in:
@@ -48,9 +48,7 @@ struct NotificationFinal {
|
||||
|
||||
#[derive(Debug, Serialize, Clone, Deserialize)]
|
||||
pub struct Notification {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
title: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
title: String,
|
||||
message: Option<String>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty", default = "Default::default")]
|
||||
tags: Vec<String>,
|
||||
@@ -61,16 +59,6 @@ pub struct Notification {
|
||||
}
|
||||
|
||||
impl Notification {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
title: None,
|
||||
message: None,
|
||||
tags: Vec::new(),
|
||||
priority: None,
|
||||
actions: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
fn finalize(self, topic: &str) -> NotificationFinal {
|
||||
NotificationFinal {
|
||||
topic: topic.into(),
|
||||
@@ -79,12 +67,6 @@ impl Notification {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Notification {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, LuaDeviceConfig)]
|
||||
pub struct Config {
|
||||
#[device_config(default("https://ntfy.sh".into()))]
|
||||
|
||||
Reference in New Issue
Block a user