From 9091b01a1528a47bb7b57fb617b25e7dfebd1aa3 Mon Sep 17 00:00:00 2001 From: Shay Date: Mon, 21 Oct 2024 13:35:09 -0700 Subject: [PATCH] move matcher into branch Co-authored-by: Travis Ralston --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;