1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-26 00:33:03 +02:00

Send emails

This commit is contained in:
Philipp Heckel 2021-12-23 21:04:17 +01:00
parent c8c53eed07
commit 873c57b3d8
6 changed files with 46 additions and 14 deletions

View file

@ -138,3 +138,8 @@ func ParsePriority(priority string) (int, error) {
func ExpandHome(path string) string {
return os.ExpandEnv(strings.ReplaceAll(path, "~", "$HOME"))
}
// ShortTopicURL shortens the topic URL to be human-friendly, removing the http:// or https://
func ShortTopicURL(s string) string {
return strings.TrimPrefix(strings.TrimPrefix(s, "https://"), "http://")
}