diff options
author | Nicolas Clerc <kernicPanel@nclerc.fr> | 2016-02-15 09:11:35 +0100 |
---|---|---|
committer | Nicolas Clerc <kernicPanel@nclerc.fr> | 2016-03-17 01:45:37 +0100 |
commit | 5e2596598f97e318f1e4e8bd835b08a011fa0b60 (patch) | |
tree | 68b3a9200e9858a7239d45b1869c38c1216d6bda /webapp/utils/async_client.jsx | |
parent | 809779a87f4380b6802314271b06540a31b83f53 (diff) | |
download | chat-5e2596598f97e318f1e4e8bd835b08a011fa0b60.tar.gz chat-5e2596598f97e318f1e4e8bd835b08a011fa0b60.tar.bz2 chat-5e2596598f97e318f1e4e8bd835b08a011fa0b60.zip |
add external slashcommands management
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r-- | webapp/utils/async_client.jsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 9c40311cf..3e2a706d4 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -755,12 +755,15 @@ 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) { |