Put the submit_sm summary back on the function it describes and tidy the review nits

This commit is contained in:
2026-08-30 23:12:22 +02:00
parent 706b61d6ca
commit 140464802b
5 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -83,7 +83,6 @@ export function submitSmParams(
return params;
}
/** Puts a message on the wire as one submit_sm per segment. */
/** Nothing goes on the wire until the whole message fits: a half-sent message bills twice. */
function checkSegments(allowed: number, segments: number): Error | undefined {
if (!Number.isInteger(allowed) || allowed < 1 || allowed > maxSegments) {
@@ -125,6 +124,7 @@ function collectSent(
return failure ? { err: failure, pduObjs, smsIds } : { pduObjs, smsIds };
}
/** Puts a message on the wire as one submit_sm per segment. */
export async function submitSms(deps: SendSmsDeps, sms: SendSmsOptions): Promise<SendSmsResult> {
const allowed = sms.maxSegments ?? maxSegments;
const encoding = sms.encoding ?? detect(sms.message);