diff options
author | Vendicated <vendicated@riseup.net> | 2023-03-02 21:05:09 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-03-02 21:05:09 +0100 |
commit | ab8c93fbacb78d9358dfc5e8f5b2deb75e12d283 (patch) | |
tree | e63e356e26aaa6e54005659c179228cfbc627950 | |
parent | d6a3edefd9f4cf71fcd96cbc44c55bfc31b088a6 (diff) | |
download | Vencord-ab8c93fbacb78d9358dfc5e8f5b2deb75e12d283.tar.gz Vencord-ab8c93fbacb78d9358dfc5e8f5b2deb75e12d283.tar.bz2 Vencord-ab8c93fbacb78d9358dfc5e8f5b2deb75e12d283.zip |
Rewrite MessageLinkEmbeds part 2
-rw-r--r-- | src/plugins/messageLinkEmbeds.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/messageLinkEmbeds.tsx b/src/plugins/messageLinkEmbeds.tsx index e7b3f72..7ca5794 100644 --- a/src/plugins/messageLinkEmbeds.tsx +++ b/src/plugins/messageLinkEmbeds.tsx @@ -168,8 +168,8 @@ function noContent(attachments: number, embeds: number) { function requiresRichEmbed(message: Message) { if (message.components.length) return true; - if (message.attachments.some(a => a.content_type?.startsWith("image/"))) return true; - if (message.embeds.some(e => e.type === "image" || (e.type === "gifv" && !tenorRegex.test(e.url!)))) return true; + if (message.attachments.some(a => !a.content_type?.startsWith("image/"))) return true; + if (message.embeds.some(e => e.type !== "image" && (e.type !== "gifv" || tenorRegex.test(e.url!)))) return true; return false; } |