mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
✨ Feature/slack node extended (#1239)
* Added reaction method to message * Increased limit for channels on getChannels, removed unused fields in the code * Using own operation for reactions * Registering reaction fields and operations * Added Operation "Reaction" to Slack.node.ts * Fixing variable name for emoji * now removing reaction on "remove" instead of "add" * Using GET for reactions.get and passing arguments as query * Added members operation * Fixed typo in timestamp * Added user.info and user.getPresence * Fixed: wrong operation name * ⚡ Improvements to #1238 * ⚡ Add field resolve data when retrieving channel members * ⚡ Minor improvements to Slack-Node Co-authored-by: Andreas Scherren <ascherren@brightfuture.de> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -76,7 +76,7 @@ export async function slackApiRequest(this: IExecuteFunctions | IExecuteSingleFu
|
||||
}
|
||||
}
|
||||
|
||||
export async function slackApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string ,method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
export async function slackApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
const returnData: IDataObject[] = [];
|
||||
let responseData;
|
||||
query.page = 1;
|
||||
@@ -88,13 +88,13 @@ export async function slackApiRequestAllItems(this: IExecuteFunctions | ILoadOpt
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
} while (
|
||||
(responseData.response_metadata !== undefined &&
|
||||
responseData.response_metadata.mext_cursor !== undefined &&
|
||||
responseData.response_metadata.next_cursor !== '' &&
|
||||
responseData.response_metadata.next_cursor !== null) ||
|
||||
responseData.response_metadata.mext_cursor !== undefined &&
|
||||
responseData.response_metadata.next_cursor !== '' &&
|
||||
responseData.response_metadata.next_cursor !== null) ||
|
||||
(responseData.paging !== undefined &&
|
||||
responseData.paging.pages !== undefined &&
|
||||
responseData.paging.page !== undefined &&
|
||||
responseData.paging.page < responseData.paging.pages
|
||||
responseData.paging.pages !== undefined &&
|
||||
responseData.paging.page !== undefined &&
|
||||
responseData.paging.page < responseData.paging.pages
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user