Skip to content

Commit

Permalink
Use utf setting for /create command
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler committed Jul 3, 2017
1 parent 010a60a commit 74a7aa5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/rocketchat-slashcommands-create/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ function Create(command, params, item) {
return result;
}

const regexp = /#?([\d-_\w]+)/g;
const regexp = new RegExp(RocketChat.settings.get('UTF8_Names_Validation'));

if (command !== 'create' || !Match.test(params, String)) {
return;
}
let channel = regexp.exec(params.trim());
channel = channel ? channel[1] : '';
channel = channel ? channel[0] : '';
if (channel === '') {
return;
}
Expand Down

0 comments on commit 74a7aa5

Please sign in to comment.