From 09a922a01cdd777b69fcbcc68ad8e2ac7dc9e81c Mon Sep 17 00:00:00 2001
From: Vendicated <vendicated@riseup.net>
Date: Wed, 25 Oct 2023 23:19:57 +0200
Subject: [PATCH] Fix MuteNewGuild

---
 src/plugins/muteNewGuild/index.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/muteNewGuild/index.tsx b/src/plugins/muteNewGuild/index.tsx
index e77f64aa..7586830b 100644
--- a/src/plugins/muteNewGuild/index.tsx
+++ b/src/plugins/muteNewGuild/index.tsx
@@ -45,16 +45,16 @@ export default definePlugin({
     authors: [Devs.Glitch, Devs.Nuckyz, Devs.carince],
     patches: [
         {
-            find: ",acceptInvite:function",
+            find: ",acceptInvite(",
             replacement: {
-                match: /INVITE_ACCEPT_SUCCESS.+?;(\i)=null.+?;/,
+                match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,
                 replace: (m, guildId) => `${m}$self.handleMute(${guildId});`
             }
         },
         {
-            find: "{joinGuild:function",
+            find: "{joinGuild:",
             replacement: {
-                match: /guildId:(\w+),lurker:(\w+).{0,20}\)}\)\);/,
+                match: /guildId:(\i),lurker:(\i).{0,20}}\)\);/,
                 replace: (m, guildId, lurker) => `${m}if(!${lurker})$self.handleMute(${guildId});`
             }
         }