diff --git a/src/utils.ts b/src/utils.ts index 3a2526ea..62d7c5c4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -147,8 +147,8 @@ async function botRedactUserMessagesIn( * @param isGlob - whether the targetID is a glob */ function matchUserId(userId: string, targetId: string, isGlob: boolean): boolean { - const matcher = new MatrixGlob(targetId); if (isGlob) { + const matcher = new MatrixGlob(targetId); return matcher.test(userId); } else { return userId === targetId;