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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
929caaff3d
Коммит
65c670a4c9
@@ -771,7 +771,7 @@ func TestPushNotificationAck(t *testing.T) {
|
||||
resp := httptest.NewRecorder()
|
||||
req := httptest.NewRequest("POST", "/api/v4/notifications/ack", nil)
|
||||
req.Header.Set(model.HeaderAuth, "Bearer "+session.Token)
|
||||
req.Body = ioutil.NopCloser(bytes.NewBufferString(fmt.Sprintf(`{"id":"123", "is_id_loaded":true, "post_id":"%s"}`, privatePost.Id)))
|
||||
req.Body = ioutil.NopCloser(bytes.NewBufferString(fmt.Sprintf(`{"id":"123", "is_id_loaded":true, "post_id":"%s", "type": "%s"}`, privatePost.Id, model.PushTypeMessage)))
|
||||
|
||||
handler.ServeHTTP(resp, req)
|
||||
assert.Equal(t, http.StatusForbidden, resp.Code)
|
||||
|
||||
Ссылка в новой задаче
Block a user