diff options
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/suggestion/switch_channel_provider.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/components/suggestion/switch_channel_provider.jsx b/webapp/components/suggestion/switch_channel_provider.jsx index 8412332ea..346721cd6 100644 --- a/webapp/components/suggestion/switch_channel_provider.jsx +++ b/webapp/components/suggestion/switch_channel_provider.jsx @@ -121,7 +121,11 @@ export default class SwitchChannelProvider extends Provider { } async fetchUsersAndChannels(channelPrefix, suggestionId) { - const usersAsync = Client4.autocompleteUsers(channelPrefix, '', ''); + let teamId = ''; + if (global.window.mm_config.RestrictDirectMessage === 'team') { + teamId = store.getState().entities.teams.currentTeamId; + } + const usersAsync = Client4.autocompleteUsers(channelPrefix, teamId, ''); const channelsAsync = Client4.searchChannels(getCurrentTeamId(getState()), channelPrefix); let usersFromServer = []; |