diff options
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/async_client.jsx | 6 | ||||
-rw-r--r-- | webapp/utils/client.jsx | 5 | ||||
-rw-r--r-- | webapp/utils/constants.jsx | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 2392b50b9..d3f91bb0e 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -781,12 +781,12 @@ export function savePreferences(preferences, success, error) { ); } -export function getSuggestedCommands(command, channelId, suggestionId, component) { - client.listCommands({command: command, channelId: channelId}, +export function getSuggestedCommands(command, suggestionId, component) { + client.listCommands( (data) => { var matches = []; data.forEach((cmd) => { - if (('/' + cmd.trigger).indexOf(command) === 0 || cmd.external_management) { + if (('/' + cmd.trigger).indexOf(command) === 0) { let s = '/' + cmd.trigger; let hint = ''; if (cmd.auto_complete_hint && cmd.auto_complete_hint.length !== 0) { diff --git a/webapp/utils/client.jsx b/webapp/utils/client.jsx index 69bda4303..e29cf71d3 100644 --- a/webapp/utils/client.jsx +++ b/webapp/utils/client.jsx @@ -1031,13 +1031,12 @@ export function regenCommandToken(data, success, error) { }); } -export function listCommands(data, success, error) { +export function listCommands(success, error) { $.ajax({ url: '/api/v1/commands/list', dataType: 'json', contentType: 'application/json', - type: 'POST', - data: JSON.stringify(data), + type: 'GET', success, error: function onError(xhr, status, err) { var e = handleError('listCommands', xhr, status, err); diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index 4ee934e11..a4aa7604c 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -595,10 +595,6 @@ export default { EMBED_TOGGLE: { label: 'embed_toggle', description: 'Show toggle for all embed previews' - }, - SLASHCMD_AUTOCMP: { - label: 'slashCmd_autocmp', - description: 'Enable external application to offer slash command autocomplete' } }, OVERLAY_TIME_DELAY: 400, |