summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
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
-rw-r--r--webapp/utils/utils.jsx3
4 files changed, 7 insertions, 11 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,
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 12a7ff50e..95a0f99d5 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -20,6 +20,7 @@ import React from 'react';
import {FormattedTime} from 'react-intl';
import icon50 from 'images/icon50x50.png';
+import bing from 'images/bing.mp3';
export function isEmail(email) {
// writing a regex to match all valid email addresses is really, really hard (see http://stackoverflow.com/a/201378)
@@ -187,7 +188,7 @@ var canDing = true;
export function ding() {
if (!isBrowserFirefox() && canDing) {
- var audio = new Audio('/static/images/bing.mp3');
+ var audio = new Audio(bing);
audio.play();
canDing = false;
setTimeout(() => {