Fix Discord mentions with extra HTML attributes

This commit is contained in:
Cadence Ember
2026-05-14 18:20:32 +12:00
parent 4815d28aa4
commit eb676256e4
3 changed files with 47 additions and 2 deletions
+1 -1
View File
@@ -821,7 +821,7 @@ async function eventToMessage(event, guild, channel, di) {
}
// Handling mentions of Discord users
input = input.replace(/("https:\/\/matrix.to\/#\/((?:@|%40)[^"]+)")>/g, (whole, attributeValue, mxid) => {
input = input.replace(/("https:\/\/matrix.to\/#\/((?:@|%40)[^"]+)")/g, (whole, attributeValue, mxid) => {
mxid = decodeURIComponent(mxid)
if (mxUtils.eventSenderIsFromDiscord(mxid)) {
// Handle mention of an OOYE sim user by their mxid