mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Do not show non-autocomplete commands for system admins (#7094)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user