MM-7188: Cleaning push notification on every read, not only on channel switch (#9348)
* MM-7188: Cleaning push notification on every read, not only on channel switch * Removed unnecesary goroutine * Fixing tests * Applying suggestion from PR
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
37e00ef916
Коммит
15d64fb201
@@ -115,7 +115,7 @@ func TestPostReplyToPostWhereRootPosterLeftChannel(t *testing.T) {
|
||||
CreateAt: 0,
|
||||
}
|
||||
|
||||
if _, err := th.App.CreatePostAsUser(&replyPost); err != nil {
|
||||
if _, err := th.App.CreatePostAsUser(&replyPost, false); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
@@ -175,7 +175,7 @@ func TestPostAction(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
post, err := th.App.CreatePostAsUser(&interactivePost)
|
||||
post, err := th.App.CreatePostAsUser(&interactivePost, false)
|
||||
require.Nil(t, err)
|
||||
|
||||
attachments, ok := post.Props["attachments"].([]*model.SlackAttachment)
|
||||
@@ -212,7 +212,7 @@ func TestPostAction(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
post2, err := th.App.CreatePostAsUser(&menuPost)
|
||||
post2, err := th.App.CreatePostAsUser(&menuPost, false)
|
||||
require.Nil(t, err)
|
||||
|
||||
attachments2, ok := post2.Props["attachments"].([]*model.SlackAttachment)
|
||||
@@ -267,7 +267,7 @@ func TestPostAction(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
postplugin, err := th.App.CreatePostAsUser(&interactivePostPlugin)
|
||||
postplugin, err := th.App.CreatePostAsUser(&interactivePostPlugin, false)
|
||||
require.Nil(t, err)
|
||||
|
||||
attachmentsPlugin, ok := postplugin.Props["attachments"].([]*model.SlackAttachment)
|
||||
@@ -308,7 +308,7 @@ func TestPostAction(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
postSiteURL, err := th.App.CreatePostAsUser(&interactivePostSiteURL)
|
||||
postSiteURL, err := th.App.CreatePostAsUser(&interactivePostSiteURL, false)
|
||||
require.Nil(t, err)
|
||||
|
||||
attachmentsSiteURL, ok := postSiteURL.Props["attachments"].([]*model.SlackAttachment)
|
||||
@@ -350,7 +350,7 @@ func TestPostAction(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
postSubpath, err := th.App.CreatePostAsUser(&interactivePostSubpath)
|
||||
postSubpath, err := th.App.CreatePostAsUser(&interactivePostSubpath, false)
|
||||
require.Nil(t, err)
|
||||
|
||||
attachmentsSubpath, ok := postSubpath.Props["attachments"].([]*model.SlackAttachment)
|
||||
@@ -389,7 +389,7 @@ func TestPostChannelMentions(t *testing.T) {
|
||||
CreateAt: 0,
|
||||
}
|
||||
|
||||
result, err := th.App.CreatePostAsUser(post)
|
||||
result, err := th.App.CreatePostAsUser(post, false)
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, map[string]interface{}{
|
||||
"mention-test": map[string]interface{}{
|
||||
|
||||
Ссылка в новой задаче
Block a user