MM-31712 Server/API: Unreads-only filter for GetUserThreads (#16660)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Eli Yukelzon
2021-01-31 11:54:35 +02:00
коммит произвёл GitHub
родитель c38dd22261
Коммит bb7e5b6e9d
5 изменённых файлов: 36 добавлений и 5 удалений

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

@@ -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 {