Fix replying to a message that had a new emoji

Without this, the emoji consistency assertion would fail because we must
call transformContent to upload the emoji to Matrix.
This commit is contained in:
Cadence Ember
2025-05-26 00:18:56 +12:00
parent bb711c26ac
commit 2a6284968f

View File

@@ -477,14 +477,7 @@ async function messageToEvent(message, guild, options = {}, di) {
}
if (repliedToContent == "") repliedToContent = "[Media]"
else if (!repliedToContent) repliedToContent = "[Replied-to message content wasn't provided by Discord]"
const repliedToHtml = markdown.toHTML(repliedToContent, {
discordCallback: getDiscordParseCallbacks(message, guild, true)
})
const repliedToBody = markdown.toHTML(repliedToContent, {
discordCallback: getDiscordParseCallbacks(message, guild, false),
discordOnly: true,
escapeHTML: false,
})
const {body: repliedToBody, html: repliedToHtml} = await transformContent(repliedToContent)
if (repliedToEventRow) {
// Generate a reply pointing to the Matrix event we found
html = `<mx-reply><blockquote><a href="https://matrix.to/#/${repliedToEventRow.room_id}/${repliedToEventRow.event_id}">In reply to</a> ${repliedToUserHtml}`