Handle another kind of emojiReaction response
Can't everyone just standardize the responses?
This commit is contained in:
parent
b10e22a9a2
commit
d77ba19308
1 changed files with 19 additions and 2 deletions
|
@ -1943,7 +1943,24 @@ function Status({
|
||||||
{!!emojiReactions?.length && (
|
{!!emojiReactions?.length && (
|
||||||
<div class="emoji-reactions">
|
<div class="emoji-reactions">
|
||||||
{emojiReactions.map((emojiReaction) => {
|
{emojiReactions.map((emojiReaction) => {
|
||||||
const { name, count, me } = emojiReaction;
|
const { name, count, me, url, staticUrl } = emojiReaction;
|
||||||
|
if (url) {
|
||||||
|
// Some servers return url and staticUrl
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
class={`emoji-reaction tag ${
|
||||||
|
me ? '' : 'insignificant'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<CustomEmoji
|
||||||
|
alt={name}
|
||||||
|
url={url}
|
||||||
|
staticUrl={staticUrl}
|
||||||
|
/>{' '}
|
||||||
|
{count}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
const isShortCode = /^:.+?:$/.test(name);
|
const isShortCode = /^:.+?:$/.test(name);
|
||||||
if (isShortCode) {
|
if (isShortCode) {
|
||||||
const emoji = emojis.find(
|
const emoji = emojis.find(
|
||||||
|
@ -1962,7 +1979,7 @@ function Status({
|
||||||
alt={name}
|
alt={name}
|
||||||
url={emoji.url}
|
url={emoji.url}
|
||||||
staticUrl={emoji.staticUrl}
|
staticUrl={emoji.staticUrl}
|
||||||
/>
|
/>{' '}
|
||||||
{count}
|
{count}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue