Document answeredOnArrival for client receivers and onRequest refusal (#85)

* Document answeredOnArrival for client receivers and onRequest refusal

* Apply stability review: correct the onRequest bind claim and teardown order
This commit is contained in:
2026-09-06 06:30:18 +02:00
committed by GitHub
parent 184d1dc7af
commit 4194816d6b
3 changed files with 125 additions and 12 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ export function createSms(input: SmsInput, handlers: SmsHandlers): Sms {
sendDlr: status => sendDlr(sms, handlers.send, status),
sendResp: options => (input.answeredAs === undefined
? sendResp(sms, answered, options ?? {}, handlers)
: alreadyAnswered(options ?? {}, handlers)),
: answeredOnArrival(options ?? {}, handlers)),
session: input.session,
get smsId(): string {
return answered.smsId;
@@ -100,7 +100,7 @@ export function createSms(input: SmsInput, handlers: SmsHandlers): Sms {
}
/** Every segment went out answered, so the call is what the shutdown waits for and nothing else. */
function alreadyAnswered(
function answeredOnArrival(
options: SendRespOptions,
handlers: Pick<SmsHandlers, 'onAnswered'>,
): Promise<VoidResult> {