ImageLink: Fix embed showing in gifs (#2417)

This commit is contained in:
Sqaaakoi 2024-05-05 20:15:01 +12:00 committed by GitHub
parent b98544ed1f
commit 49e78793c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,15 +10,15 @@ import definePlugin from "@utils/types";
export default definePlugin({
name: "ImageLink",
description: "Never hide image links in messages, even if it's the only content",
authors: [Devs.Kyuuhachi],
authors: [Devs.Kyuuhachi, Devs.Sqaaakoi],
patches: [
{
find: "isEmbedInline:function()",
find: "unknownUserMentionPlaceholder:",
replacement: {
match: /(?<=isEmbedInline:function\(\)\{return )\i(?=\})/,
replace: "()=>false",
},
},
],
match: /\(0,\i\.isEmbedInline\)\(\i\)/,
replace: "false",
}
}
]
});