diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-06-19 08:25:47 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-06-19 08:25:47 -0400 |
commit | 09c4089c95ed8f4306f0005918677bdbaa18a486 (patch) | |
tree | f379d018fd1107d0678d3cddaee0db2d93c47845 /api | |
parent | 6051b01cdfbf426a6d069aa57cb612c1813a8c3f (diff) | |
download | chat-09c4089c95ed8f4306f0005918677bdbaa18a486.tar.gz chat-09c4089c95ed8f4306f0005918677bdbaa18a486.tar.bz2 chat-09c4089c95ed8f4306f0005918677bdbaa18a486.zip |
improved split function
Diffstat (limited to 'api')
-rw-r--r-- | api/post.go | 2 |
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 { |