MM-35392 Load thread unreads for other teams on app load (#17944)

* Add ability to include thread unreads in team unreads api response

* Do not include GMs/DMs in team unreads for threads

* Fix bad merge
Этот коммит содержится в:
Joram Wilander
2021-07-22 10:24:20 -04:00
коммит произвёл GitHub
родитель 04ef406bd6
Коммит a0cc420e2a
11 изменённых файлов: 176 добавлений и 130 удалений

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

@@ -420,8 +420,9 @@ func getTeamsUnreadForUser(c *Context, w http.ResponseWriter, r *http.Request) {
// optional team id to be excluded from the result
teamId := r.URL.Query().Get("exclude_team")
includeCollapsedThreads := r.URL.Query().Get("include_collapsed_threads") == "true"
unreadTeamsList, err := c.App.GetTeamsUnreadForUser(teamId, c.Params.UserId)
unreadTeamsList, err := c.App.GetTeamsUnreadForUser(teamId, c.Params.UserId, includeCollapsedThreads)
if err != nil {
c.Err = err
return