optionally exclude threads in direct messages (#29042)

* optionally exclude threads in direct messages

* add excludeDirect option in client4

* Skip flaky test

* refactor double negate

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Elias Nahum
2024-11-14 16:57:15 +08:00
коммит произвёл GitHub
родитель 38e2f67583
Коммит 701d1dbd68
6 изменённых файлов: 69 добавлений и 24 удалений

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

@@ -8724,6 +8724,9 @@ func (c *Client4) GetUserThreads(ctx context.Context, userId, teamId string, opt
if options.TotalsOnly {
v.Set("totalsOnly", "true")
}
if options.ExcludeDirect {
v.Set("excludeDirect", fmt.Sprintf("%t", options.ExcludeDirect))
}
url := c.userThreadsRoute(userId, teamId)
if len(v) > 0 {
url += "?" + v.Encode()

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

@@ -88,6 +88,8 @@ type GetUserThreadsOpts struct {
// IncludeIsUrgent will return IsUrgent field as well to assert is the thread is urgent or not
IncludeIsUrgent bool
ExcludeDirect bool
}
func (o *Thread) Etag() string {