MM-40148: threadsOnly query param for user threads (#19833)
* MM-40148: threadsOnly query param for user threads Currently we always calculate counts when fetching user threads. Those counts include total, unread replies, and unread mentions, and are potentially expensive to calculate. This commit adds a new query param 'threadsOnly' which won't calculate any counts and just return threads. Co-authored-by: koox00 <3829551+koox00@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
27bd16e5f5
Коммит
9521797b15
@@ -7813,6 +7813,12 @@ func (c *Client4) GetUserThreads(userId, teamId string, options GetUserThreadsOp
|
||||
if options.Unread {
|
||||
v.Set("unread", "true")
|
||||
}
|
||||
if options.ThreadsOnly {
|
||||
v.Set("threadsOnly", "true")
|
||||
}
|
||||
if options.TotalsOnly {
|
||||
v.Set("totalsOnly", "true")
|
||||
}
|
||||
url := c.userThreadsRoute(userId, teamId)
|
||||
if len(v) > 0 {
|
||||
url += "?" + v.Encode()
|
||||
|
||||
Ссылка в новой задаче
Block a user