summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
authorsamogot <samogot@gmail.com>2016-07-19 15:27:23 +0300
committerChristopher Speller <crspeller@gmail.com>2016-07-19 08:27:23 -0400
commitf31e8e09f54418f867f95192a71e67b450340c13 (patch)
tree313f38a9bd8c999909b26cf49172df32e427dedc /api/user.go
parentfebe3a01cd5db03d152e993d42f39800e494a83a (diff)
downloadchat-f31e8e09f54418f867f95192a71e67b450340c13.tar.gz
chat-f31e8e09f54418f867f95192a71e67b450340c13.tar.bz2
chat-f31e8e09f54418f867f95192a71e67b450340c13.zip
PLT-914 Add mention notifications for replies on a comment thread (#3130)
* PLT-914 Add mention notifications for replies on a comment thread * remove useless store method fix highlighting comments posted before th user write something to thread * refactor out isCommentMention function after rebase * change comment bar highlighting to replay icon mention highlighting * settings and always visible highlight * fix unit tests for new settings * change highlight behaviour - if any message in comment thread generates mention - all thread is highlighted - remove always visible highlightion * fix bug about the textarea in the center channel not clearing * fix default settings value notify_props.comments * do not highlight own comments if there is no other user's messages in thread * refactor out ReactDOM.findDOMNode * refactor out using of UserStore from component
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/user.go b/api/user.go
index 652da14ad..7dd24fe1b 100644
--- a/api/user.go
+++ b/api/user.go
@@ -1930,6 +1930,12 @@ func updateUserNotify(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
+ comments := props["comments"]
+ if len(comments) == 0 {
+ c.SetInvalidParam("updateUserNotify", "comments")
+ return
+ }
+
var user *model.User
if result := <-uchan; result.Err != nil {
c.Err = result.Err