Update TransferCall activity

Having "pending" outcomes isn't practical - it would require the user to always connect them to the activity itself if they did not want to continue the workflow.
This commit is contained in:
Sipke Schoorstra 2021-08-19 14:43:27 +02:00
parent 630257098f
commit e24c9dd59d
2 changed files with 2 additions and 7 deletions

View file

@ -23,9 +23,6 @@ namespace Elsa.Activities.Telnyx.Activities
Description = "Transfer a call to a new destination",
Outcomes = new[]
{
TelnyxOutcomeNames.Transferring,
TelnyxOutcomeNames.CallInitiated,
TelnyxOutcomeNames.Bridged,
TelnyxOutcomeNames.Answered,
TelnyxOutcomeNames.Hangup
},
@ -162,9 +159,7 @@ namespace Elsa.Activities.Telnyx.Activities
return payload switch
{
CallAnsweredPayload => Outcome(TelnyxOutcomeNames.Answered),
CallBridgedPayload => Outcome(TelnyxOutcomeNames.Bridged),
CallHangupPayload => Outcome(TelnyxOutcomeNames.Hangup),
CallInitiatedPayload => Outcome(TelnyxOutcomeNames.CallInitiated),
_ => throw new ArgumentOutOfRangeException(nameof(payload))
};
}

View file

@ -11,7 +11,7 @@ namespace Elsa.Activities.Telnyx.Handlers
public ResumeTransferCall(IWorkflowLaunchpad workflowLaunchpad) : base(workflowLaunchpad)
{
}
protected override IEnumerable<Type> GetSupportedPayloadTypes() => new[] {typeof(CallAnsweredPayload), typeof(CallInitiatedPayload), typeof(CallBridgedPayload), typeof(CallHangupPayload)};
protected override IEnumerable<Type> GetSupportedPayloadTypes() => new[] {typeof(CallAnsweredPayload), typeof(CallHangupPayload)};
}
}