From 5b5faf823918fdce273026c1b9945446320cf38a Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 1 Aug 2024 14:22:31 +0200 Subject: [PATCH] safer patch --- src/plugins/typingIndicator/index.tsx | 2 +- src/plugins/unreadCountBadge/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/typingIndicator/index.tsx b/src/plugins/typingIndicator/index.tsx index 6df3f4b80..bf40a8c56 100644 --- a/src/plugins/typingIndicator/index.tsx +++ b/src/plugins/typingIndicator/index.tsx @@ -172,7 +172,7 @@ export default definePlugin({ // This is the thread "spine" that shows in the left find: "M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z", replacement: { - match: /mentionsCount:\i.+?null(?<=channel:(\i).+?)/, + match: /mentionsCount:\i.{0,50}?null(?<=channel:(\i).+?)/, replace: "$&,$self.TypingIndicator($1.id)" } } diff --git a/src/plugins/unreadCountBadge/index.tsx b/src/plugins/unreadCountBadge/index.tsx index 20a848ee9..43e16419b 100644 --- a/src/plugins/unreadCountBadge/index.tsx +++ b/src/plugins/unreadCountBadge/index.tsx @@ -52,7 +52,7 @@ export default definePlugin({ find: "M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z", replacement: { - match: /mentionsCount:\i.+?null(?<=channel:(\i).+?)/, + match: /mentionsCount:\i.{0,50}?null(?<=channel:(\i).+?)/, replace: "$&,$self.CountBadge({channel: $1})" }