From 686f2d925f5d3f238b813481f827b7cd9ce2e0eb Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 21 Dec 2023 23:41:12 +0100 Subject: [PATCH] fix canary crashing --- src/plugins/blurNsfw/index.ts | 4 ++-- src/plugins/messageLogger/index.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/blurNsfw/index.ts b/src/plugins/blurNsfw/index.ts index cb6be54c..a80f9f26 100644 --- a/src/plugins/blurNsfw/index.ts +++ b/src/plugins/blurNsfw/index.ts @@ -45,8 +45,8 @@ export default definePlugin({ { find: ".embedWrapper,embed", replacement: [{ - match: /\.embedWrapper/g, - replace: "$&+(this.props.channel.nsfw?' vc-nsfw-img':'')" + match: /\.embedWrapper(?=.+?channel_id:(\i)\.id)/g, + replace: "$&+($1.nsfw?' vc-nsfw-img':'')" }] } ], diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index ac43a9f0..ef0aa03b 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -328,6 +328,7 @@ export default definePlugin({ // Attachment renderer // Module 96063 find: ".removeAttachmentHoverButton", + group: true, replacement: [ { match: /(className:\i,attachment:\i),/,