Skip to content

Commit

Permalink
⚡ clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency committed Mar 27, 2024
1 parent 4aa5437 commit e7dbf70
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/nodes-base/nodes/Twilio/TwilioTrigger.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import type {
INodeType,
INodeTypeDescription,
IWebhookResponseData,
ILoadOptionsFunctions,
INodePropertyOptions,
} from 'n8n-workflow';

import { twilioTriggerApiRequest } from './GenericFunctions';
Expand Down Expand Up @@ -63,7 +61,7 @@ export class TwilioTrigger implements INodeType {
displayName: "The 'New Call' event may take up to thirty minutes to be triggered",
name: 'callTriggerNotice',
type: 'notice',
default: ' ',
default: '',
displayOptions: {
show: {
updates: ['com.twilio.voice.insights.call-summary.complete'],
Expand Down Expand Up @@ -147,14 +145,13 @@ export class TwilioTrigger implements INodeType {
// if there is more than one event type add the others on the existing subscription
if (allowedUpdates.length > 1) {
for (let index = 1; index < allowedUpdates.length; index++) {
const body = {
Type: allowedUpdates[index],
};
await twilioTriggerApiRequest.call(
this,
'POST',
`Subscriptions/${workflowData.subscriptionId}/SubscribedEvents`,
body,
{
Type: allowedUpdates[index],
},
);
}
}
Expand Down

0 comments on commit e7dbf70

Please sign in to comment.