1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Merge pull request #2074 from matrix-org/t3chguy/hide_ddg_me_after_space

hide some commands after space as they have special semantics
This commit is contained in:
David Baker
2018-07-19 13:51:05 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -26,11 +26,12 @@ import SettingsStore, {SettingLevel} from './settings/SettingsStore';
class Command {
constructor({name, args='', description, runFn}) {
constructor({name, args='', description, runFn, hideCompletionAfterSpace=false}) {
this.command = '/' + name;
this.args = args;
this.description = description;
this.runFn = runFn;
this.hideCompletionAfterSpace = hideCompletionAfterSpace;
}
getCommand() {
@@ -78,6 +79,7 @@ export const CommandMap = {
});
return success();
},
hideCompletionAfterSpace: true,
}),
nick: new Command({
@@ -466,6 +468,7 @@ export const CommandMap = {
name: 'me',
args: '<message>',
description: _td('Displays action'),
hideCompletionAfterSpace: true,
}),
};
/* eslint-enable babel/no-invalid-this */