Skip to content
Snippets Groups Projects
Commit 68ab8ad0 authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #6683 from RocketChat/hotfix/integration-error

[FIX] Error when returning undefined from incoming intergation’s script
parents a3f6a8d7 7af34976
No related branches found
No related tags found
No related merge requests found
......@@ -208,9 +208,11 @@ function executeIntegrationRest() {
return RocketChat.API.v1.failure(result.error);
}
this.bodyParams = result && result.content;
this.response = typeof result !== 'undefined' && result.response;
if (result.user) {
this.user = result.user;
if (typeof result !== 'undefined') {
this.response = result.response;
if (result.user) {
this.user = result.user;
}
}
logger.incoming.debug('[Process Incoming Request result of Trigger', this.integration.name, ':]');
logger.incoming.debug('result', this.bodyParams);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment