mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(Slack Node): User id not sent correctly to API when updating user profile (#11153)
Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
This commit is contained in:
@@ -1299,18 +1299,29 @@ export class SlackV2 implements INodeType {
|
||||
|
||||
options.fields = fields;
|
||||
}
|
||||
|
||||
Object.assign(body, options);
|
||||
let requestBody: IDataObject = { profile: body };
|
||||
|
||||
let userId;
|
||||
if (options.user) {
|
||||
userId = options.user;
|
||||
delete body.user;
|
||||
requestBody = { profile: body, user: userId };
|
||||
}
|
||||
|
||||
responseData = await slackApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/users.profile.set',
|
||||
{ profile: body },
|
||||
requestBody,
|
||||
qs,
|
||||
);
|
||||
|
||||
responseData = responseData.profile;
|
||||
}
|
||||
}
|
||||
|
||||
if (resource === 'userGroup') {
|
||||
//https://api.slack.com/methods/usergroups.create
|
||||
if (operation === 'create') {
|
||||
|
||||
Reference in New Issue
Block a user