Excludes remote channels from channel search (#28708)

* Excludes remote channels from channel search

This is done through a new body parameter in the SearchAllChannels
endpoint that allows to search for local only channels, which are
either channels that are shared but marked as homed locally, or
channels that are not shared at all.

* fix lint

* Fix tests

---------

Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
Этот коммит содержится в:
Miguel de la Cruz
2024-10-18 15:41:24 +02:00
коммит произвёл GitHub
родитель f06742c7e2
Коммит b4d8b6239c
13 изменённых файлов: 82 добавлений и 8 удалений

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

@@ -1961,7 +1961,8 @@ export default class Client4 {
};
const includeDeleted = Boolean(opts.include_deleted);
const nonAdminSearch = Boolean(opts.nonAdminSearch);
let queryParams: {include_deleted?: boolean; system_console?: boolean} = {include_deleted: includeDeleted};
const excludeRemote = Boolean(opts.exclude_remote);
let queryParams: {include_deleted?: boolean; system_console?: boolean; exclude_remote?: boolean} = {include_deleted: includeDeleted, exclude_remote: excludeRemote};
if (nonAdminSearch) {
queryParams = {system_console: false};
delete body.nonAdminSearch;