diff --git a/packages/cli/BREAKING-CHANGES.md b/packages/cli/BREAKING-CHANGES.md index 0fbe0ec92..3effaa08e 100644 --- a/packages/cli/BREAKING-CHANGES.md +++ b/packages/cli/BREAKING-CHANGES.md @@ -2,6 +2,23 @@ This list shows all the versions which include breaking changes and how to upgrade +## 0.37.0 + +### What changed? + +To make it possible to support also Rocketchat on-premise the credentials had to be changed. +The `subdomain` parameter had to get renamed to `domain`. + +### When is action necessary? + +When you currently use the Rocketchat-Node. + +### How to upgrade: + +Open the Rocketchat credentials and fill the parameter `domain`. If you had previously the +subdomain "example" set you have to set now "https://example.rocket.chat". + + ## 0.19.0 ### What changed? diff --git a/packages/nodes-base/credentials/RocketchatApi.credentials.ts b/packages/nodes-base/credentials/RocketchatApi.credentials.ts index 0231d5a72..bd3fbc649 100644 --- a/packages/nodes-base/credentials/RocketchatApi.credentials.ts +++ b/packages/nodes-base/credentials/RocketchatApi.credentials.ts @@ -21,11 +21,11 @@ export class RocketchatApi implements ICredentialType { default: '', }, { - displayName: 'Sub Domain', - name: 'subdomain', + displayName: 'Domain', + name: 'domain', type: 'string' as NodePropertyTypes, default: '', - placeholder: 'n8n' + placeholder: 'https://n8n.rocket.chat', }, ]; } diff --git a/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts b/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts index b058e67e6..b9d0763f4 100644 --- a/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts @@ -13,16 +13,14 @@ export async function rocketchatApiRequest(this: IHookFunctions | IExecuteFuncti throw new Error('No credentials got returned!'); } - const headerWithAuthentication = Object.assign({}, headers, + const headerWithAuthentication = Object.assign({}, headers, { 'X-Auth-Token': credentials.authKey, 'X-User-Id': credentials.userId }); - const endpoint = 'rocket.chat/api/v1'; - const options: OptionsWithUri = { headers: headerWithAuthentication, method, body, - uri: `https://${credentials.subdomain}.${endpoint}${resource}.${operation}`, + uri: `${credentials.domain}${resource}.${operation}`, json: true }; diff --git a/packages/nodes-base/nodes/Rocketchat/rocketchat.png b/packages/nodes-base/nodes/Rocketchat/rocketchat.png index 7d2985129..d44ab3a5c 100644 Binary files a/packages/nodes-base/nodes/Rocketchat/rocketchat.png and b/packages/nodes-base/nodes/Rocketchat/rocketchat.png differ