summaryrefslogtreecommitdiffstats
path: root/app/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/notification.go')
-rw-r--r--app/notification.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/app/notification.go b/app/notification.go
index 181ad4aac..6d0de2223 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -892,8 +892,17 @@ func GetExplicitMentions(message string, keywords map[string][]string) *Explicit
}
// remove trailing '.', as that is the end of a sentence
- word = strings.TrimSuffix(word, ".")
- if checkForMention(word) {
+ foundWithSuffix := false
+
+ for strings.HasSuffix(word, ".") {
+ word = strings.TrimSuffix(word, ".")
+ if checkForMention(word) {
+ foundWithSuffix = true
+ break
+ }
+ }
+
+ if foundWithSuffix {
continue
}