You've already forked focalboard
mirror of
https://github.com/mattermost/focalboard.git
synced 2025-07-06 23:36:34 +02:00
Not requesting for channels in personal server mode (#3429)
This commit is contained in:
@ -348,14 +348,19 @@ export default function ShareBoardDialog(props: Props): JSX.Element {
|
|||||||
className={'userSearchInput'}
|
className={'userSearchInput'}
|
||||||
cacheOptions={true}
|
cacheOptions={true}
|
||||||
loadOptions={async (inputValue: string) => {
|
loadOptions={async (inputValue: string) => {
|
||||||
const users = await client.searchTeamUsers(inputValue)
|
|
||||||
const channels = await client.searchUserChannels(match.params.teamId || '', inputValue)
|
|
||||||
const result = []
|
const result = []
|
||||||
if (users) {
|
if (Utils.isFocalboardPlugin()) {
|
||||||
result.push({label: intl.formatMessage({id: 'shareBoard.members-select-group', defaultMessage: 'Members'}), options: users || []})
|
const users = await client.searchTeamUsers(inputValue)
|
||||||
}
|
if (users) {
|
||||||
if (channels) {
|
result.push({label: intl.formatMessage({id: 'shareBoard.members-select-group', defaultMessage: 'Members'}), options: users || []})
|
||||||
result.push({label: intl.formatMessage({id: 'shareBoard.channels-select-group', defaultMessage: 'Channels'}), options: channels || []})
|
}
|
||||||
|
const channels = await client.searchUserChannels(match.params.teamId || '', inputValue)
|
||||||
|
if (channels) {
|
||||||
|
result.push({label: intl.formatMessage({id: 'shareBoard.channels-select-group', defaultMessage: 'Channels'}), options: channels || []})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const users = await client.searchTeamUsers(inputValue) || []
|
||||||
|
result.push(...users)
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}}
|
}}
|
||||||
|
Reference in New Issue
Block a user