Simplify thread_store/GetThreadForUser (#21588)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
534a9bcbf0
Коммит
b9d00a1f28
@@ -3033,7 +3033,7 @@ func TestSetPostUnreadWithoutCollapsedThreads(t *testing.T) {
|
||||
|
||||
threadMembership, appErr := th.App.GetThreadMembershipForUser(th.BasicUser.Id, rootPost1.Id)
|
||||
require.Nil(t, appErr)
|
||||
thread, appErr := th.App.GetThreadForUser(th.BasicTeam.Id, threadMembership, false)
|
||||
thread, appErr := th.App.GetThreadForUser(threadMembership, false)
|
||||
require.Nil(t, appErr)
|
||||
require.Equal(t, int64(2), thread.UnreadMentions)
|
||||
require.Equal(t, int64(3), thread.UnreadReplies)
|
||||
|
||||
@@ -3029,7 +3029,7 @@ func getThreadForUser(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
thread, err := c.App.GetThreadForUser(c.Params.TeamId, threadMembership, extended)
|
||||
thread, err := c.App.GetThreadForUser(threadMembership, extended)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user