You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
hide some commands after space as they have special semantics
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user