We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71ebecb commit 85798b2Copy full SHA for 85798b2
src/api/controllers/sendMessage.controller.ts
@@ -19,10 +19,12 @@ import { BadRequestException } from '@exceptions';
19
import { isBase64, isURL } from 'class-validator';
20
import emojiRegex from 'emoji-regex';
21
22
+const regex = emojiRegex();
23
+
24
function isEmoji(str: string) {
25
if (str === '') return true;
26
- const match = str.match(emojiRegex());
27
+ const match = str.match(regex);
28
return match?.length === 1 && match[0] === str;
29
}
30
0 commit comments