From cc52ed596e4adeb2112c895769f8318c4f3c1afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Szewczak?= Date: Mon, 13 Apr 2020 22:37:41 +0200 Subject: [PATCH] add2010 --- .../nodes/Mattermost/Mattermost.node.ts | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/nodes-base/nodes/Mattermost/Mattermost.node.ts b/packages/nodes-base/nodes/Mattermost/Mattermost.node.ts index 22874e8e1d..86ee67b231 100644 --- a/packages/nodes-base/nodes/Mattermost/Mattermost.node.ts +++ b/packages/nodes-base/nodes/Mattermost/Mattermost.node.ts @@ -1038,27 +1038,16 @@ export class Mattermost implements INodeType { for (const att of arr) { if (Array.isArray(att.actions)) for (const attaction of att.actions) { - //console.log(attaction); if (attaction.integration.item !== undefined) { - //console.log('integration items'); attaction.integration = attaction.integration.item; - var tmpintegration = {}; - for (const attactioninteg of attaction.integration) { - //console.log(attactioninteg); - if (attactioninteg.context.property !== undefined) { - //console.log('connnnnn'); - var tmpcontex = {}; - for (const attactionintegprop of attactioninteg.context.property ) { - // console.log(attactionintegprop); - Object.assign(tmpcontex, { [attactionintegprop.name] : attactionintegprop.value } ); - } - delete attactioninteg.context ; - attactioninteg.context = tmpcontex ; - } - Object.assign(tmpintegration, attactioninteg); + if (Array.isArray(attaction.integration.context.property)) { + var tmpcontex = {}; + for (const attactionintegprop of attaction.integration.context.property ) { + Object.assign(tmpcontex, { [attactionintegprop.name] : attactionintegprop.value } ); + } + delete attaction.integration.context; + attaction.integration.context = tmpcontex; } - delete attaction.integration; - attaction.integration=tmpintegration; } } };