Skip to content

Commit

Permalink
Merge pull request #11 from timedin-de/main
Browse files Browse the repository at this point in the history
Added dashes (-) to allowed topics
  • Loading branch information
ranfdev authored Nov 27, 2023
2 parents 52dec9e + 4bd8d30 commit e87e2c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ntfy-daemon/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn emoji_map() -> &'static HashMap<String, String> {
}

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 {
Expand Down

0 comments on commit e87e2c2

Please sign in to comment.