Improve emoji support

This commit is contained in:
Amish Shah
2016-10-27 16:12:02 +01:00
parent 81059885a2
commit d129457624
4 changed files with 99 additions and 8 deletions

View File

@@ -1,4 +1,7 @@
module.exports = function parseEmoji(text) {
if (text.includes('%')) {
text = decodeURIComponent(text);
}
if (text.includes(':')) {
const [name, id] = text.split(':');
return { name, id };