Claim an error only where the state failed, and freeze the two state lists

This commit is contained in:
2026-09-04 08:51:13 +02:00
parent 54493c12b2
commit 144567c294
5 changed files with 26 additions and 13 deletions
+2 -2
View File
@@ -131,10 +131,10 @@ export function parseReceipt(message: string): Receipt {
type MessageType = 'intermediate' | 'other' | 'receipt' | 'unmarked';
/** SMPP 3.4 Appendix B lists every other receipt state as final. */
export const transientStates: MessageState[] = ['ENROUTE', 'SCHEDULED'];
export const transientStates: readonly MessageState[] = ['ENROUTE', 'SCHEDULED'];
/** Written by the far-end SME, not by the MC reporting on a message we submitted. */
const smeMessageTypes: number[] = [
const smeMessageTypes: readonly number[] = [
consts.ESM_CLASS.CONVERSATION_ABORT,
consts.ESM_CLASS.DELIVERY_ACKNOWLEDGEMENT,
consts.ESM_CLASS.USER_ACKNOWLEDGEMENT,