summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-06-19 08:08:54 -0400
committerJoramWilander <jwawilander@gmail.com>2015-06-19 08:08:54 -0400
commitde5ff38891b4f20b40867dd8f4d10a7b9f00166c (patch)
tree29baac2e8acd066a1ba4c3b0b00fda85c3c43741 /api
parent6e9947b0ef16968ae41cbea4fdf26aea1545c4f7 (diff)
downloadchat-de5ff38891b4f20b40867dd8f4d10a7b9f00166c.tar.gz
chat-de5ff38891b4f20b40867dd8f4d10a7b9f00166c.tar.bz2
chat-de5ff38891b4f20b40867dd8f4d10a7b9f00166c.zip
fix a bug where mentions wouldn't update for words after a new line
Diffstat (limited to 'api')
-rw-r--r--api/post.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/post.go b/api/post.go
index 36607c231..f8125a442 100644
--- a/api/post.go
+++ b/api/post.go
@@ -302,10 +302,11 @@ func fireAndForgetNotifications(post *model.Post, teamId, teamUrl string) {
// Build a map as a list of unique user_ids that are mentioned in this post
splitF := func(c rune) bool {
- return c == ',' || c == ' ' || c == '.' || c == '!' || c == '?' || c == ':' || c == '<' || c == '>'
+ return c == ',' || c == ' ' || c == '.' || c == '!' || c == '?' || c == ':' || c == '<' || c == '>' || c == '\n'
}
splitMessage := strings.FieldsFunc(strings.Replace(post.Message, "<br>", " ", -1), splitF)
for _, word := range splitMessage {
+ l4g.Debug(word)
// Non-case-sensitive check for regular keys
userIds1, keyMatch := keywordMap[strings.ToLower(word)]