MM-31712 Server/API: Unreads-only filter for GetUserThreads (#16660)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c38dd22261
Коммит
bb7e5b6e9d
@@ -5806,7 +5806,9 @@ func (c *Client4) GetUserThreads(userId, teamId string, options GetUserThreadsOp
|
||||
if options.Deleted {
|
||||
v.Set("deleted", "true")
|
||||
}
|
||||
|
||||
if options.Unread {
|
||||
v.Set("unread", "true")
|
||||
}
|
||||
url := c.GetUserThreadsRoute(userId, teamId)
|
||||
if len(v) > 0 {
|
||||
url += "?" + v.Encode()
|
||||
|
||||
@@ -48,6 +48,9 @@ type GetUserThreadsOpts struct {
|
||||
|
||||
// Since filters the threads based on their LastUpdateAt timestamp.
|
||||
Since uint64
|
||||
|
||||
// Unread will make sure that only threads with unread replies are returned
|
||||
Unread bool
|
||||
}
|
||||
|
||||
func (o *ThreadResponse) ToJson() string {
|
||||
|
||||
Ссылка в новой задаче
Block a user