getChannelUsersQuery

Function

A utility method used to build an IQuery to search for users that are permitted to be at-mentioned for the given channel.

  • getChannelUsersQuery(terms: string[], channel: IChannel, currentUsername: string, requestOptions: IRequestOptions) : Promise<IQuery>

Parameters

Parameter Type Default Notes
terms Required string[]

An array of strings to search for. Each string is mapped to username and fullname, filters as an OR condition

channel Required IChannel

An IChannel record

currentUsername Optional string

The currently authenticated user's username

requestOptions Optional IRequestOptions

An IRequestOptions object

Available requestOptions

Property Type Notes

Returns

a promise that resolves an IQuery

Promise<IQuery>
Property Type Notes
filters IFilter[]

Filters that make up the query

targetEntity EntityType

What entity is this query targeting. This is used internally to ensure we query the correct API

properties Optional Record<stringany>

Additional properties. Useful for groupMember queries where we need to send in the groupId to construct the url


Function defined in common/src/discussions/utils.ts:162