Fix multiple MXCs per emoji #87

Closed
opened 2026-04-08 04:05:24 +00:00 by cadence · 2 comments
Owner

Discussed here: https://matrix.to/#/!cBxtVRxDlZvSVhJXVK:cadence.moe/$nX0xIx8BgW5kkQjl7FeOkkdT8hPzWSkmb8eS3PfJOBo?via=cadence.moe&via=matrix.org&via=ucc.asn.au

Breaks m->d custom emoji reactions on clients that don't send a name with their reaction.

Not yet sure why there are multiple copies of the emoji. That's what I need to fix.

Discussed here: https://matrix.to/#/!cBxtVRxDlZvSVhJXVK:cadence.moe/$nX0xIx8BgW5kkQjl7FeOkkdT8hPzWSkmb8eS3PfJOBo?via=cadence.moe&via=matrix.org&via=ucc.asn.au Breaks m->d custom emoji reactions on clients that don't send a name with their reaction. Not yet sure why there are multiple copies of the emoji. That's what I need to fix.
cadence added this to the v3.x milestone 2026-05-21 12:51:21 +00:00
Author
Owner

Bug was introduced in 1741bc0fa7. It is self-healing but needs a one-time database update to remove the previous pngs/gifs from the emojis table so they can be replaced with the webp versions. This probably works:

DELETE FROM emoji WHERE mxc_url NOT IN (SELECT mxc_url FROM file WHERE discord_url LIKE 'https://cdn.discordapp.com/emojis/%.webp%');

Waiting for feedback from the affected user.

Bug was introduced in 1741bc0fa7fcba35bcc094c1f82a9142a52331b0. It is self-healing but needs a one-time database update to remove the previous pngs/gifs from the emojis table so they can be replaced with the webp versions. This probably works: ``` DELETE FROM emoji WHERE mxc_url NOT IN (SELECT mxc_url FROM file WHERE discord_url LIKE 'https://cdn.discordapp.com/emojis/%.webp%'); ``` Waiting for feedback from the affected user.
Author
Owner

Fixed in 24c2dee7d3

Fixed in 24c2dee7d346316428e7b2ef980d77046edb604e
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cadence/out-of-your-element#87
No description provided.