Put the submit_sm summary back on the function it describes and tidy the review nits
This commit is contained in:
@@ -19,8 +19,8 @@ export type IncomingRequestsOptions = {
|
||||
maxReassembly?: number | undefined;
|
||||
onRequest?: OnRequest | undefined;
|
||||
reassemblyTimeout?: number | undefined;
|
||||
smsIdFormat?: SmsIdFormat | undefined;
|
||||
session: Session;
|
||||
smsIdFormat?: SmsIdFormat | undefined;
|
||||
systemId?: string | undefined;
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export type SmsIdNotation = keyof typeof notations;
|
||||
/** The notation per place the peer writes an id. An omitted place is left as it arrived. */
|
||||
export type SmsIdFormat = Partial<Record<typeof places[number], SmsIdNotation | undefined>>;
|
||||
|
||||
export const smsIdNotations: string[] = Object.keys(notations);
|
||||
export const smsIdNotations: readonly string[] = Object.keys(notations);
|
||||
|
||||
export const smsIdPlaces: readonly string[] = places;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user