forked from cadence/out-of-your-element
Fix translating URL encoded mentions of sim users
This commit is contained in:
parent
e4f66a5077
commit
83070dcf7e
2 changed files with 34 additions and 1 deletions
|
@ -448,7 +448,8 @@ async function eventToMessage(event, guild, di) {
|
|||
}
|
||||
|
||||
// Handling mentions of Discord users
|
||||
input = input.replace(/("https:\/\/matrix.to\/#\/(@[^"]+)")>/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
|
||||
const userID = select("sim", "user_id", {mxid: mxid}).pluck().get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue