@@ -81,6 +81,16 @@ See MDL-81015 for more information on this feature.
8181
8282:::
8383
84+ ### Message Truncation
85+
86+ The SMS API automatically truncates messages that exceed the maximum allowed length before sending.
87+
88+ This is handled by the ` truncate_message() ` method, which ensures that messages comply with the defined length limit.
89+
90+ The default maximum length is defined in the gateway root class, but it can be modified or overridden by any class that extends it.
91+
92+ Additionally, the ` truncate_message() ` method itself can be overridden to implement custom truncation logic.
93+
8494## Fetching messages
8595
8696Every sent message is stored in the database to support status checks, and for subsequent reporting.
@@ -140,23 +150,20 @@ graph TD
140150 classDef success fill:green,color:white,font-weight:bold
141151
142152 unknown["UNKNOWN"]
143- MOS["MESSAGE_OVER_SIZE"]:::failed
144153 GNA["GATEWAY_NOT_AVAILABLE"]:::failed
145154 GQ["GATEWAY_QUEUED"]:::inprogress
146155 GS["GATEWAY_SENT"]:::success
147156 GF["GATEWAY_FAILED"]:::failed
148157 GR["GATEWAY_REJECTED"]:::failed
149- MLC{Message length check}
158+ TRUNCATE["Truncate message"]
150159 GWSEL{Gateway selection}
151160
152161 direction TB
153162 start[/Start/] --> |Initial state| unknown
154- unknown --> |Initial message checks| MLC
155- MLC --> |Message over length| MOS
156- MLC --> |Message within limits| GWSEL
157-
163+ unknown --> |Check gateway availability| GWSEL
158164 GWSEL --> |No gateway available to send this message| GNA
159- GWSEL --> |Message passed to Gateway| Gateway
165+ GWSEL --> |Gateway selected| TRUNCATE
166+ TRUNCATE --> |Message passed to Gateway| Gateway
160167
161168 subgraph Gateway
162169 GQ --> |The gateway rejected the message| GR
0 commit comments