From 6578eb487ea16e04fdf704f19a57268aa8078f11 Mon Sep 17 00:00:00 2001 From: AutumnVN Date: Thu, 16 Nov 2023 01:13:19 +0700 Subject: [PATCH] MessageLogger: fix attachment ignore (#1989) --- src/plugins/messageLogger/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index 36f9ab3f9..ac43a9f0c 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -302,6 +302,7 @@ export default definePlugin({ match: /attachments:(\i)\((\i)\)/, replace: "attachments: $1((() => {" + + " if ($self.shouldIgnore($2)) return $2;" + " let old = arguments[1]?.attachments;" + " if (!old) return $2;" + " let new_ = $2.attachments?.map(a => a.id) ?? [];" +