diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-05 23:41:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-05 23:41:47 +0200 |
commit | b9c76e2edbc372e1b472f6ba480631b79fe24722 (patch) | |
tree | 86938e4c82781404d8adfde2555e1c26b77209b4 /app/javascript | |
parent | 2559d9166cea24fceb9b72ca112804811d87a4a8 (diff) |
When processing custom emoji, ensure a non-animated version exists (#5230)
Use the non-animated version in web UI, but return both in API
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/emoji.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/reducers/statuses.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/emoji.js b/app/javascript/mastodon/emoji.js index 1df2373d9..cf0077958 100644 --- a/app/javascript/mastodon/emoji.js +++ b/app/javascript/mastodon/emoji.js @@ -52,7 +52,7 @@ export const buildCustomEmojis = customEmojis => { customEmojis.forEach(emoji => { const shortcode = emoji.get('shortcode'); - const url = emoji.get('url'); + const url = emoji.get('static_url'); const name = shortcode.replace(':', ''); emojis.push({ diff --git a/app/javascript/mastodon/reducers/statuses.js b/app/javascript/mastodon/reducers/statuses.js index 2d72b12e8..ed16e016f 100644 --- a/app/javascript/mastodon/reducers/statuses.js +++ b/app/javascript/mastodon/reducers/statuses.js @@ -60,7 +60,7 @@ const normalizeStatus = (state, status) => { const searchContent = [status.spoiler_text, status.content].join(' ').replace(/<br \/>/g, '\n').replace(/<\/p><p>/g, '\n\n'); const emojiMap = normalStatus.emojis.reduce((obj, emoji) => { - obj[`:${emoji.shortcode}:`] = emoji.url; + obj[`:${emoji.shortcode}:`] = emoji.static_url; return obj; }, {}); |