Fix emoji parsing in the remote emoji fetcher

This commit is contained in:
Jesse Wierzbinski 2024-04-10 16:13:09 -10:00
parent 275244b941
commit dcdee7e4bf
No known key found for this signature in database

View file

@ -55,8 +55,11 @@ export const fetchEmoji = async (emoji: Lysand.Emoji, host?: string) => {
return await client.emoji.create({ return await client.emoji.create({
data: { data: {
shortcode: emoji.name, shortcode: emoji.name,
url: emoji.url[0].content, url: Object.entries(emoji.url)[0][1].content,
alt: emoji.alt || emoji.url[0].description || undefined, alt:
emoji.alt ||
Object.entries(emoji.url)[0][1].description ||
undefined,
content_type: Object.keys(emoji.url)[0], content_type: Object.keys(emoji.url)[0],
visible_in_picker: true, visible_in_picker: true,
instance: host instance: host