diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-08-02 17:07:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 17:07:30 -0400 |
commit | eee711145cb0b466dc8ccca886d1f67cd83cdfdc (patch) | |
tree | 55df6b2656da76b63f586644d735915c7008aa02 | |
parent | 873e4f49038746b71ab9997fc10c89192ec1cd16 (diff) | |
download | chat-eee711145cb0b466dc8ccca886d1f67cd83cdfdc.tar.gz chat-eee711145cb0b466dc8ccca886d1f67cd83cdfdc.tar.bz2 chat-eee711145cb0b466dc8ccca886d1f67cd83cdfdc.zip |
Do not show non-autocomplete commands for system admins (#7094)
-rw-r--r-- | webapp/actions/integration_actions.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/actions/integration_actions.jsx b/webapp/actions/integration_actions.jsx index 6afaa5789..c9bba9202 100644 --- a/webapp/actions/integration_actions.jsx +++ b/webapp/actions/integration_actions.jsx @@ -213,8 +213,12 @@ export function regenCommandToken(id) { export function getSuggestedCommands(command, suggestionId, component) { Client4.getCommandsList(TeamStore.getCurrentId()).then( (data) => { - var matches = []; + let matches = []; data.forEach((cmd) => { + if (!cmd.auto_complete) { + return; + } + if (cmd.trigger !== 'shortcuts' || !UserAgent.isMobile()) { if (('/' + cmd.trigger).indexOf(command) === 0) { const s = '/' + cmd.trigger; |