🐛 Fixes issue #651 and #652 (#668)

* 🐛 Fixes issue #651 and #652

*  Added description to username field
This commit is contained in:
Ricardo Espinoza
2020-06-20 12:11:11 -04:00
committed by GitHub
parent 3d45b67d50
commit 54a670c0de
3 changed files with 5 additions and 28 deletions

View File

@@ -454,6 +454,10 @@ export class Slack implements INodeType {
body.username = this.getNodeParameter('username', i) as string;
}
// ignore body.as_user as it's deprecated
delete body.as_user;
if (!jsonParameters) {
const attachments = this.getNodeParameter('attachments', i, []) as unknown as Attachment[];
const blocksUi = (this.getNodeParameter('blocksUi', i, []) as IDataObject).blocksValues as IDataObject[];
@@ -691,10 +695,6 @@ export class Slack implements INodeType {
ts,
};
if (authentication === 'accessToken') {
body.as_user = this.getNodeParameter('as_user', i) as boolean;
}
// The node does save the fields data differently than the API
// expects so fix the data befre we send the request
for (const attachment of attachments) {