mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 04:08:32 +03:00
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 && (
|
||||
<div class="emoji-reactions">
|
||||
{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);
|
||||
if (isShortCode) {
|
||||
const emoji = emojis.find(
|
||||
|
@ -1962,7 +1979,7 @@ function Status({
|
|||
alt={name}
|
||||
url={emoji.url}
|
||||
staticUrl={emoji.staticUrl}
|
||||
/>
|
||||
/>{' '}
|
||||
{count}
|
||||
</span>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue