MM-31712 Server/API: Unreads-only filter for GetUserThreads (#16660)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c38dd22261
Коммит
bb7e5b6e9d
@@ -2857,6 +2857,7 @@ func getThreadsForUser(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
Since: 0,
|
||||
Page: 0,
|
||||
PageSize: 30,
|
||||
Unread: false,
|
||||
Extended: false,
|
||||
Deleted: false,
|
||||
}
|
||||
@@ -2892,9 +2893,11 @@ func getThreadsForUser(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
deletedStr := r.URL.Query().Get("deleted")
|
||||
unreadStr := r.URL.Query().Get("unread")
|
||||
extendedStr := r.URL.Query().Get("extended")
|
||||
|
||||
options.Deleted, _ = strconv.ParseBool(deletedStr)
|
||||
options.Unread, _ = strconv.ParseBool(unreadStr)
|
||||
options.Extended, _ = strconv.ParseBool(extendedStr)
|
||||
|
||||
threads, err := c.App.GetThreadsForUser(c.Params.UserId, c.Params.TeamId, options)
|
||||
|
||||
Ссылка в новой задаче
Block a user