summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-18 13:16:51 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-18 13:16:51 -0400
commit35320efe1afad87419992275ba555ddcbfcdf46b (patch)
tree52925b8521dd4b8c8291499f76c2ed3c278271f8 /webapp/utils
parent6d586c7309cb0ddaca6580dd1520aef4ff554fb5 (diff)
downloadchat-35320efe1afad87419992275ba555ddcbfcdf46b.tar.gz
chat-35320efe1afad87419992275ba555ddcbfcdf46b.tar.bz2
chat-35320efe1afad87419992275ba555ddcbfcdf46b.zip
Revert "PLT-2183 Slash command auto-complete"
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/async_client.jsx6
-rw-r--r--webapp/utils/client.jsx5
-rw-r--r--webapp/utils/constants.jsx4
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,