implement autoplay gifs for custom emoji

This commit is contained in:
Nolan Lawson 2018-01-31 18:22:47 -08:00
parent f1eaee4674
commit 48df08bd31
1 changed files with 3 additions and 2 deletions

View File

@ -349,12 +349,13 @@
originalAccount: (originalStatus) => originalStatus.account,
originalMediaAttachments: (originalStatus) => originalStatus.media_attachments,
statusId: (originalStatus) => originalStatus.id,
emojifiedContent: (originalStatus) => {
emojifiedContent: (originalStatus, $autoplayGifs) => {
let status = originalStatus
let content = status.content
if (status.emojis && status.emojis.length) {
for (let emoji of status.emojis) {
let { shortcode, url } = emoji
let { shortcode, url, url_static } = emoji
let urlToUse = $autoplayGifs ? url : url_static
let shortcodeWithColons = `:${shortcode}:`
content = replaceAll(
content,