Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

Commit

Permalink
Fix mxId to match user JID escaped
Browse files Browse the repository at this point in the history
Also related to matrix-org#308 ..
  • Loading branch information
maranda committed Mar 23, 2022
1 parent 4af5d67 commit 115150d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/xmppjs/XJSInstance.ts
Expand Up @@ -462,8 +462,10 @@ export class XmppJsInstance extends EventEmitter implements IBifrostInstance {
for (const uri of bodyMatches) {
const portions = uri.match(XMPP_URI_SUB_MATCH);
if (portions.length === 3) {
const mxId = XMPP_PROTOCOL.getMxIdForProtocol(portions[1], portions[2], this.config.bridge.userPrefix);
body = body.replace(uri, "https://matrix.to/#/" + mxId);
const mxId = XMPP_PROTOCOL.getMxIdForProtocol(
portions[1] + "=40" + portions[2], this.config.bridge.domain, this.config.bridge.userPrefix
);
body = body.replace(uri, "https://matrix.to/#/" + mxId.userId);
}
}
}
Expand Down

0 comments on commit 115150d

Please sign in to comment.