mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Slack Node): Attachments fix (#8471)
Co-authored-by: Elias Meire <elias@meire.dev>
This commit is contained in:
@@ -174,7 +174,21 @@ export function getMessageContent(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'attachment':
|
case 'attachment':
|
||||||
content = { attachments: this.getNodeParameter('attachments', i) } as IDataObject;
|
const attachmentsUI = this.getNodeParameter('attachments', i) as IDataObject[];
|
||||||
|
|
||||||
|
const attachments: IDataObject[] = [];
|
||||||
|
|
||||||
|
for (const attachment of attachmentsUI) {
|
||||||
|
if (attachment.fields !== undefined) {
|
||||||
|
if ((attachment?.fields as IDataObject)?.item) {
|
||||||
|
attachment.fields = (attachment?.fields as IDataObject)?.item as IDataObject[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
attachments.push(attachment);
|
||||||
|
}
|
||||||
|
|
||||||
|
content = { attachments } as IDataObject;
|
||||||
|
|
||||||
if (includeLinkToWorkflow && Array.isArray(content.attachments)) {
|
if (includeLinkToWorkflow && Array.isArray(content.attachments)) {
|
||||||
content.attachments.push({
|
content.attachments.push({
|
||||||
text: automatedMessage,
|
text: automatedMessage,
|
||||||
|
|||||||
Reference in New Issue
Block a user