MM-20649 Fix incorrect mention count when marking a DM channel as unread (#13245)

* MM-20649 Fix incorrect mention count when marking a DM channel as unread

* Satisfy govet

* Update missed test
Этот коммит содержится в:
Harrison Healey
2019-12-02 09:30:08 -05:00
коммит произвёл GitHub
родитель 4e5369e759
Коммит a0130b86d7
6 изменённых файлов: 70 добавлений и 47 удалений

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

@@ -1132,12 +1132,12 @@ func TestMarkChannelAsUnreadFromPost(t *testing.T) {
th.CreatePost(dc)
th.CreatePost(dc)
response, err := th.App.MarkChannelAsUnreadFromPost(dm1.Id, u1.Id)
response, err := th.App.MarkChannelAsUnreadFromPost(dm1.Id, u2.Id)
assert.Nil(t, err)
assert.Equal(t, int64(0), response.MsgCount)
assert.Equal(t, int64(3), response.MentionCount)
unread, err := th.App.GetChannelUnread(dc.Id, u1.Id)
unread, err := th.App.GetChannelUnread(dc.Id, u2.Id)
require.Nil(t, err)
assert.Equal(t, int64(3), unread.MsgCount)
assert.Equal(t, int64(3), unread.MentionCount)