diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-07-04 04:01:27 -0400 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-07-04 09:01:27 +0100 |
commit | 7a09b4bd783495e705f1a590a70d5729ce447356 (patch) | |
tree | 3988d57396dcf3a63414b5c02c39f0dcddb5aede /webapp/components | |
parent | 04b00e0933c8623c89d99bf291303b24512cacd8 (diff) | |
download | chat-7a09b4bd783495e705f1a590a70d5729ce447356.tar.gz chat-7a09b4bd783495e705f1a590a70d5729ce447356.tar.bz2 chat-7a09b4bd783495e705f1a590a70d5729ce447356.zip |
Make channel switcher partially obey RestrictDirectMessage setting (#6830)
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 = []; |