summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-06-19 08:25:47 -0400
committerJoramWilander <jwawilander@gmail.com>2015-06-19 08:25:47 -0400
commit2950917552836166de2f9db74fd25316266c12b3 (patch)
treefdb38c223e98f4e72ce700782292503d413b206b /api
parent0d3c5f8b2fdb688e6972eef9df3efe1572f1161a (diff)
downloadchat-2950917552836166de2f9db74fd25316266c12b3.tar.gz
chat-2950917552836166de2f9db74fd25316266c12b3.tar.bz2
chat-2950917552836166de2f9db74fd25316266c12b3.zip
improved split function
Diffstat (limited to 'api')
-rw-r--r--api/post.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/post.go b/api/post.go
index 0e521034d..3acc95551 100644
--- a/api/post.go
+++ b/api/post.go
@@ -302,7 +302,7 @@ 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 == '>' || c == '\n'
+ return model.SplitRunes[c]
}
splitMessage := strings.FieldsFunc(strings.Replace(post.Message, "<br>", " ", -1), splitF)
for _, word := range splitMessage {