From 40b4f98cb396392166a88857744d9984b13ba30c Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Tue, 22 Sep 2026 23:43:33 -0400 Subject: [PATCH] sabam Co-Authored-By: sadan <117494111+sadan4@users.noreply.github.com> --- src/plugins/fakeNitro/index.tsx | 4 ++-- src/plugins/imageLink/index.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 3c5ffd751..3eeabab14 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -338,8 +338,8 @@ export default definePlugin({ { // Call our function to decide whether the emoji link should be kept or not predicate: () => settings.store.transformEmojis, - match: /1!==(\i)\.length\|\|1!==\i\.length/, - replace: (m, content) => `${m}||$self.shouldKeepEmojiLink(${content}[0])` + match: /(\i)=\(0,\i\.\i\)\((\i)\)(?=&&)(?<=\i=\1,\2=\(\i\?\?\i\)\.embeds.{0,50}?)/, + replace: (m, content, _embeds) => `${m} && !$self.shouldKeepEmojiLink(${content}[0])` }, { // Patch the rendered message content to add fake nitro emojis or remove sticker links diff --git a/src/plugins/imageLink/index.ts b/src/plugins/imageLink/index.ts index 0d01cb1d3..c3edeb23a 100644 --- a/src/plugins/imageLink/index.ts +++ b/src/plugins/imageLink/index.ts @@ -15,7 +15,8 @@ export default definePlugin({ patches: [ { - find: "unknownUserMentionPlaceholder:", + // small util file + find: "={linkCount:0,onlyLinks:!1};function ", replacement: { // SimpleEmbedTypes.has(embed.type) && isEmbedInline(embed) match: /\i\.has\(\i\.type\)&&\(0,\i\.\i\)\(\i\)/,