3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fixed incomplete attachment list for mass action message commands

This commit is contained in:
Lily Bergonzat 2024-02-24 20:46:48 +01:00
parent 91025d8569
commit e879a15aa4

View file

@ -10,7 +10,9 @@ export async function formatReasonWithMessageLinkForAttachments(
attachments: Attachment[],
) {
if (isContextMessage(context)) {
return context.attachments.size > 0 ? ((reason || "") + " " + context.url).trim() : reason;
const allAttachments = [...new Set([...context.attachments.values(), ...attachments])];
return allAttachments.length > 0 ? ((reason || "") + " " + context.url).trim() : reason;
}
if (attachments.length < 1) {