MM-34758 Collapsed Reply Threads without mobile support (#17424)

Summary
added support for legacy clients accessing server
added collapsed_threads_supported param to viewChannel API and setPostUnread API

Ticket Link
https://mattermost.atlassian.net/browse/MM-34758

Related Webapp PR
mattermost/mattermost-webapp#7933
Этот коммит содержится в:
Eli Yukelzon
2021-05-26 18:10:25 +03:00
коммит произвёл GitHub
родитель ebed0c67f7
Коммит 46649292f8
21 изменённых файлов: 417 добавлений и 65 удалений

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

@@ -2032,7 +2032,7 @@ func TestViewChannelShouldNotUpdateThreads(t *testing.T) {
th.App.ViewChannel(&model.ChannelView{
ChannelId: channel.Id,
PrevChannelId: "",
}, user2.Id, "")
}, user2.Id, "", true)
m1, e1 := th.App.GetThreadMembershipsForUser(user2.Id, th.BasicTeam.Id)
require.NoError(t, e1)
@@ -2072,7 +2072,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)
th.App.MarkChannelAsUnreadFromPost(postRoot.Id, user1.Id, 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)