From 159846664c1cdcf25dd920e34f32565a1136b0b6 Mon Sep 17 00:00:00 2001 From: emerson Date: Tue, 18 Oct 2022 20:00:33 -0400 Subject: [PATCH] fix bug where mxids can have spaces --- src/Server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Server.ts b/src/Server.ts index 55ca533..2c68132 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -151,7 +151,7 @@ export class Server { if (maybeMatrixUser) { return maybeMatrixUser; } - const localPart = mxid.split(":")[0].substring(1) + const localPart = mxid.split(":")[0].substring(1).replace(' ', '-20'); if (!this.nickToMatrixUser.has(localPart)) { const newMatrixUser = new MatrixUser(mxid, localPart); this.matrixUsers.set(mxid, newMatrixUser);