diff --git a/ntfy-daemon/src/models.rs b/ntfy-daemon/src/models.rs index 4e824ba..0748a31 100644 --- a/ntfy-daemon/src/models.rs +++ b/ntfy-daemon/src/models.rs @@ -18,7 +18,7 @@ fn emoji_map() -> &'static HashMap { } pub fn validate_topic(topic: &str) -> Result<&str, Error> { - let re = Regex::new(r"^\w+$").unwrap(); + let re = Regex::new(r"^[\w\-]+$").unwrap(); if re.is_match(topic) { Ok(topic) } else {