Skip to content

Commit

Permalink
move matcher into branch
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Ralston <travisr@matrix.org>
  • Loading branch information
H-Shay and turt2live authored Oct 21, 2024
1 parent b32ea66 commit 9091b01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9091b01

Please sign in to comment.