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:
parent
630257098f
commit
e24c9dd59d
|
|
@ -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))
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)};
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue