Skip to content

Commit e87e2c2

Browse files
authored
Merge pull request #11 from timedin-de/main
Added dashes (-) to allowed topics
2 parents 52dec9e + 4bd8d30 commit e87e2c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ntfy-daemon/src/models.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn emoji_map() -> &'static HashMap<String, String> {
1818
}
1919

2020
pub fn validate_topic(topic: &str) -> Result<&str, Error> {
21-
let re = Regex::new(r"^\w+$").unwrap();
21+
let re = Regex::new(r"^[\w\-]+$").unwrap();
2222
if re.is_match(topic) {
2323
Ok(topic)
2424
} else {

0 commit comments

Comments
 (0)