mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-09 17:36:23 +00:00
Fix HideAttachments when message is forwarded
This commit is contained in:
parent
013c8d061d
commit
d86023e8fd
1 changed files with 6 additions and 1 deletions
|
@ -49,7 +49,12 @@ export default definePlugin({
|
|||
await this.buildCss();
|
||||
|
||||
addButton("HideAttachments", msg => {
|
||||
if (!msg.attachments.length && !msg.embeds.length && !msg.stickerItems.length) return null;
|
||||
// @ts-ignore - discord-types lags behind discord.
|
||||
const hasAttachmentsInShapshots = msg.messageSnapshots.some(
|
||||
(snapshot: { message: { attachments: any[]; }; }) => snapshot?.message.attachments.length
|
||||
);
|
||||
|
||||
if (!msg.attachments.length && !msg.embeds.length && !msg.stickerItems.length && !hasAttachmentsInShapshots) return null;
|
||||
|
||||
const isHidden = hiddenMessages.has(msg.id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue