From 5a2e51b135090c084ed2709904333f1792969b79 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Thu, 1 Mar 2018 08:15:42 +0000 Subject: [PATCH] Render external animated emoji --- webapp/titanembeds/static/js/embed.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index 27e0095..9f48ec2 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -1006,6 +1006,8 @@ } var rendered = Mustache.render(template, {"id": "$2", "name": "$1"}).trim(); message.content = message.content.replace(/<:(.*?):(.*?)>/g, rendered); + rendered = Mustache.render(template, {"id": "$2", "name": "$1", "animated": true}).trim(); + message.content = message.content.replace(/<a:(.*?):(.*?)>/g, rendered); message.content = twemoji.parse(message.content, { className: "message_emoji", callback: function(icon, options, variant) { // exclude special characters