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>
Этот коммит содержится в:
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user