summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
authorDerrick Anderson <derrick@andersonwebstudio.com>2018-05-15 11:54:24 -0400
committerDerrick Anderson <derrick@andersonwebstudio.com>2018-05-15 11:54:24 -0400
commitfbbe1f7cefd52a27fd52893509b5365d275f9bee (patch)
tree5dae4ebc13fca2749b4278bba772ec13c0924e03 /app/notification.go
parenta1656dffa98fbc8865e476b214e4e0c562547d39 (diff)
parent228bc4bd1dc84bf741978711b680a06dd9d67613 (diff)
downloadchat-fbbe1f7cefd52a27fd52893509b5365d275f9bee.tar.gz
chat-fbbe1f7cefd52a27fd52893509b5365d275f9bee.tar.bz2
chat-fbbe1f7cefd52a27fd52893509b5365d275f9bee.zip
Merge branch 'merge410rc5'
Diffstat (limited to 'app/notification.go')
-rw-r--r--app/notification.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/notification.go b/app/notification.go
index 7198de764..4bdc6c94f 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -919,12 +919,13 @@ func GetExplicitMentions(message string, keywords map[string][]string) *Explicit
// remove trailing '.', as that is the end of a sentence
foundWithSuffix := false
-
- for strings.HasSuffix(word, ".") {
- word = strings.TrimSuffix(word, ".")
- if checkForMention(word) {
- foundWithSuffix = true
- break
+ for _, suffixPunctuation := range []string{".", ":"} {
+ for strings.HasSuffix(word, suffixPunctuation) {
+ word = strings.TrimSuffix(word, suffixPunctuation)
+ if checkForMention(word) {
+ foundWithSuffix = true
+ break
+ }
}
}