Revert "PLT-2183 Slash command auto-complete"

Этот коммит содержится в:
Christopher Speller
2016-03-18 13:16:51 -04:00
родитель 6d586c7309
Коммит 35320efe1a
14 изменённых файлов: 151 добавлений и 333 удалений

Просмотреть файл

@@ -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) {

Просмотреть файл

@@ -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);

Просмотреть файл

@@ -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,