[MM-44434] Introduced search for channel id's through system console. (#20259)

* Introduced search for channel id's

* Small fix to test case as it is not looking at count

* Introduced searching channels by id as a ChannelOpt. Defaulting to true for system console for the time being

* go fmt

* Modified whether to include search by id by passing it in as prop to search endpoint. Modified webapp to pass through search by id as well

* Fixed issue with full text search, as there is not always necessarily an index on Id.

* Modified test to verify count, and moved code inside conditional

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Riccardo Santoni
2022-06-16 11:32:16 -04:00
коммит произвёл GitHub
родитель f15873eaf4
Коммит dd7067cbe9
7 изменённых файлов: 23 добавлений и 4 удалений

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

@@ -123,6 +123,7 @@ type ChannelModeratedRolesPatch struct {
// ExcludeDefaultChannels will exclude the configured default channels (ex 'town-square' and 'off-topic').
// IncludeDeleted will include channel records where DeleteAt != 0.
// ExcludeChannelNames will exclude channels from the results by name.
// IncludeSearchById will include searching matches against channel IDs in the results
// Paginate whether to paginate the results.
// Page page requested, if results are paginated.
// PerPage number of results per page, if paginated.
@@ -139,6 +140,7 @@ type ChannelSearchOpts struct {
PolicyID string
ExcludePolicyConstrained bool
IncludePolicyID bool
IncludeSearchById bool
Public bool
Private bool
Page *int

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

@@ -16,6 +16,7 @@ type ChannelSearch struct {
Public bool `json:"public"`
Private bool `json:"private"`
IncludeDeleted bool `json:"include_deleted"`
IncludeSearchById bool `json:"include_search_by_id"`
Deleted bool `json:"deleted"`
Page *int `json:"page,omitempty"`
PerPage *int `json:"per_page,omitempty"`