Use custom server from selected subscription

This commit is contained in:
ranfdev
2023-11-09 18:37:11 +01:00
parent 5c518322be
commit 98811de34a
3 changed files with 19 additions and 12 deletions

View File

@ -8,6 +8,7 @@ use serde::{Deserialize, Serialize};
use crate::Error;
pub const DEFAULT_SERVER: &str = "https://ntfy.sh";
static EMOJI_MAP: OnceLock<HashMap<String, String>> = OnceLock::new();
fn emoji_map() -> &'static HashMap<String, String> {
@ -188,7 +189,7 @@ pub struct SubscriptionBuilder {
impl SubscriptionBuilder {
pub fn new(topic: String) -> Self {
Self {
server: "https://ntfy.sh".to_string(),
server: DEFAULT_SERVER.to_string(),
topic,
muted: false,
archived: false,