diff options
Diffstat (limited to 'api/post.go')
-rw-r--r-- | api/post.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/api/post.go b/api/post.go index 25a68304d..3acc95551 100644 --- a/api/post.go +++ b/api/post.go @@ -58,6 +58,12 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) { } func createValetPost(c *Context, w http.ResponseWriter, r *http.Request) { + if !utils.Cfg.TeamSettings.AllowValet { + c.Err = model.NewAppError("createValetPost", "The valet feature is currently turned off. Please contact your system administrator for details.", "") + c.Err.StatusCode = http.StatusNotImplemented + return + } + post := model.PostFromJson(r.Body) if post == nil { c.SetInvalidParam("createValetPost", "post") @@ -296,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 == '>' + return model.SplitRunes[c] } splitMessage := strings.FieldsFunc(strings.Replace(post.Message, "<br>", " ", -1), splitF) for _, word := range splitMessage { |