MM-36687 CRT push notifications (#18347)

* CRT changes

* Lint fix

* Moved postId check

* Moved postId check

* Lint fix

* Misc

* Added test case for badge count while clearing notifications

* Fixed count when CRT is on and added isCRTEnabled, teamId to isIdLoaded notifications

* test fix

* isCRTEnabledForUser capitalised

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Anurag Shivarathri
2021-11-15 10:41:47 +05:30
коммит произвёл GitHub
родитель 929caaff3d
Коммит 65c670a4c9
15 изменённых файлов: 136 добавлений и 70 удалений

Просмотреть файл

@@ -1547,7 +1547,7 @@ func TestUpdateThreadReadForUser(t *testing.T) {
require.Nil(t, appErr)
require.Zero(t, threads.Total)
_, appErr = th.App.UpdateThreadReadForUser(th.BasicUser.Id, th.BasicChannel.TeamId, rootPost.Id, replyPost.CreateAt)
_, appErr = th.App.UpdateThreadReadForUser("currentSessionId", th.BasicUser.Id, th.BasicChannel.TeamId, rootPost.Id, replyPost.CreateAt)
require.Nil(t, appErr)
threads, appErr = th.App.GetThreadsForUser(th.BasicUser.Id, th.BasicTeam.Id, model.GetUserThreadsOpts{})
@@ -1584,7 +1584,7 @@ func TestUpdateThreadReadForUser(t *testing.T) {
mockStore.On("User").Return(&mockUserStore)
mockStore.On("Thread").Return(&mockThreadStore)
_, err = th.App.UpdateThreadReadForUser("user1", "team1", "postid", 100)
_, err = th.App.UpdateThreadReadForUser("currentSessionId", "user1", "team1", "postid", 100)
require.Error(t, err)
})
}