Remove emojification on message send
This commit is contained in:
parent
4811b5fd4d
commit
7a55c68c6c
2 changed files with 5 additions and 25 deletions
|
@ -274,22 +274,6 @@ export function emojiToImage(emoji: string): string | undefined {
|
|||
return imageByEmoji[emoji];
|
||||
}
|
||||
|
||||
export function replaceColons(str: string) {
|
||||
return str.replace(/:[a-z0-9-_+]+:(?::skin-tone-[1-5]:)?/gi, m => {
|
||||
const [shortName = '', skinTone = '0'] = m
|
||||
.replace('skin-tone-', '')
|
||||
.toLowerCase()
|
||||
.split(':')
|
||||
.filter(Boolean);
|
||||
|
||||
if (shortName && isShortName(shortName)) {
|
||||
return convertShortName(shortName, parseInt(skinTone, 10));
|
||||
}
|
||||
|
||||
return m;
|
||||
});
|
||||
}
|
||||
|
||||
function getCountOfAllMatches(str: string, regex: RegExp) {
|
||||
let match = regex.exec(str);
|
||||
let count = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue