Skip to content
Snippets Groups Projects
Commit 79d73c76 authored by Bradley Hilton's avatar Bradley Hilton Committed by Rodrigo Nascimento
Browse files

Strip the colons when searching (#10323)

parent 9637a709
No related merge requests found
......@@ -13,7 +13,13 @@ class EmojiCustom extends RocketChat.models._Base {
}
//find
findByNameOrAlias(name, options) {
findByNameOrAlias(emojiName, options) {
let name = emojiName;
if (typeof emojiName === 'string') {
name = emojiName.replace(/:/g, '');
}
const query = {
$or: [
{name},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment