MM-35297 Add the ability to control if thread is followed when marking post as unread and don't autofollow from API (#17799)

* Add the ability to control if thread is followed when marking post as unread and don't autofollow from API

* Fix style
Этот коммит содержится в:
Joram Wilander
2021-06-18 15:54:17 -04:00
коммит произвёл GitHub
родитель f69b28610a
Коммит faf9e8725b
7 изменённых файлов: 73 добавлений и 46 удалений

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

@@ -2078,7 +2078,7 @@ func TestCollapsedThreadFetch(t *testing.T) {
thread, nErr := th.App.Srv().Store.Thread().Get(postRoot.Id)
require.NoError(t, nErr)
require.Len(t, thread.Participants, 1)
th.App.MarkChannelAsUnreadFromPost(postRoot.Id, user1.Id, true)
th.App.MarkChannelAsUnreadFromPost(postRoot.Id, user1.Id, true, true)
l, err := th.App.GetPostsForChannelAroundLastUnread(channel.Id, user1.Id, 10, 10, true, true, false)
require.Nil(t, err)
require.Len(t, l.Order, 1)