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
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
febe3a01cd
Коммит
f31e8e09f5
@@ -1247,6 +1247,7 @@ func TestUserUpdateNotify(t *testing.T) {
|
||||
data["email"] = "true"
|
||||
data["desktop"] = "all"
|
||||
data["desktop_sound"] = "false"
|
||||
data["comments"] = "any"
|
||||
|
||||
if _, err := Client.UpdateUserNotify(data); err == nil {
|
||||
t.Fatal("Should have errored - not logged in")
|
||||
@@ -1267,6 +1268,9 @@ func TestUserUpdateNotify(t *testing.T) {
|
||||
if result.Data.(*model.User).NotifyProps["email"] != data["email"] {
|
||||
t.Fatal("NotifyProps did not update properly - email")
|
||||
}
|
||||
if result.Data.(*model.User).NotifyProps["comments"] != data["comments"] {
|
||||
t.Fatal("NotifyProps did not update properly - comments")
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := Client.UpdateUserNotify(nil); err == nil {
|
||||
@@ -1300,6 +1304,12 @@ func TestUserUpdateNotify(t *testing.T) {
|
||||
if _, err := Client.UpdateUserNotify(data); err == nil {
|
||||
t.Fatal("Should have errored - empty email")
|
||||
}
|
||||
|
||||
data["email"] = "true"
|
||||
data["comments"] = ""
|
||||
if _, err := Client.UpdateUserNotify(data); err == nil {
|
||||
t.Fatal("Should have errored - empty comments")
|
||||
}
|
||||
}
|
||||
|
||||
func TestFuzzyUserCreate(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user