Merge pull request #4895 from jugglinmike/gh-12743-ignore-user-names
"ignore"/"unignore" commands: validate user ID
This commit is contained in:
commit
ea15725164
1 changed files with 2 additions and 2 deletions
|
@ -660,7 +660,7 @@ export const Commands = [
|
|||
if (args) {
|
||||
const cli = MatrixClientPeg.get();
|
||||
|
||||
const matches = args.match(/^(\S+)$/);
|
||||
const matches = args.match(/^(@[^:]+:\S+)$/);
|
||||
if (matches) {
|
||||
const userId = matches[1];
|
||||
const ignoredUsers = cli.getIgnoredUsers();
|
||||
|
@ -690,7 +690,7 @@ export const Commands = [
|
|||
if (args) {
|
||||
const cli = MatrixClientPeg.get();
|
||||
|
||||
const matches = args.match(/^(\S+)$/);
|
||||
const matches = args.match(/(^@[^:]+:\S+$)/);
|
||||
if (matches) {
|
||||
const userId = matches[1];
|
||||
const ignoredUsers = cli.getIgnoredUsers();
|
||||
|
|
Loading…
Reference in a new issue