diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-17 11:45:42 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-17 11:45:42 -0400 |
commit | 6b9d89522475c84e7833d17179b3af65b92240d6 (patch) | |
tree | cf5fc21b47bdf745a47541eb8beb2c85084a5015 /webapp/utils/async_client.jsx | |
parent | d42459729c6015b07c2f0d872a44212e93bccb39 (diff) | |
parent | c94b7b9d4fe2c51e6427888d9ba6e3d7b8eb321c (diff) | |
download | chat-6b9d89522475c84e7833d17179b3af65b92240d6.tar.gz chat-6b9d89522475c84e7833d17179b3af65b92240d6.tar.bz2 chat-6b9d89522475c84e7833d17179b3af65b92240d6.zip |
Merge pull request #2169 from kernicPanel/external-slashcommands-management
PLT-2183 Slash command auto-complete
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r-- | webapp/utils/async_client.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 9c40311cf..9a5869f9a 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -755,12 +755,12 @@ export function savePreferences(preferences, success, error) { ); } -export function getSuggestedCommands(command, suggestionId, component) { - client.listCommands( +export function getSuggestedCommands(command, channelId, suggestionId, component) { + client.listCommands({command: command, channelId: channelId}, (data) => { var matches = []; data.forEach((cmd) => { - if (('/' + cmd.trigger).indexOf(command) === 0) { + if (('/' + cmd.trigger).indexOf(command) === 0 || cmd.external_management) { let s = '/' + cmd.trigger; let hint = ''; if (cmd.auto_complete_hint && cmd.auto_complete_hint.length !== 0) { |