summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
authorDerrick Anderson <derrick@andersonwebstudio.com>2018-05-15 11:19:27 -0400
committerDerrick Anderson <derrick@andersonwebstudio.com>2018-05-15 11:19:27 -0400
commit228bc4bd1dc84bf741978711b680a06dd9d67613 (patch)
tree5dae4ebc13fca2749b4278bba772ec13c0924e03 /app/notification.go
parenta1656dffa98fbc8865e476b214e4e0c562547d39 (diff)
parent9301e575c880970dc5642605adcc37903d176227 (diff)
downloadchat-228bc4bd1dc84bf741978711b680a06dd9d67613.tar.gz
chat-228bc4bd1dc84bf741978711b680a06dd9d67613.tar.bz2
chat-228bc4bd1dc84bf741978711b680a06dd9d67613.zip
Merge remote-tracking branch 'origin/release-4.10' into 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
+ }
}
}