@@ -81,6 +81,18 @@ See MDL-81015 for more information on this feature.
8181
8282:::
8383
84+ ### Message Truncation
85+
86+ <Since version =" 5.0 " issueNumber =" MDL-84342 " />
87+
88+ The SMS API automatically truncates messages that exceed the maximum allowed length before sending.
89+
90+ This is handled by the ` truncate_message() ` method, which ensures that messages comply with the defined length limit.
91+
92+ The default maximum length is defined in the gateway root class, but it can be modified or overridden by any class that extends it.
93+
94+ Additionally, the ` truncate_message() ` method itself can be overridden to implement custom truncation logic.
95+
8496## Fetching messages
8597
8698Every sent message is stored in the database to support status checks, and for subsequent reporting.
@@ -140,23 +152,20 @@ graph TD
140152 classDef success fill:green,color:white,font-weight:bold
141153
142154 unknown["UNKNOWN"]
143- MOS["MESSAGE_OVER_SIZE"]:::failed
144155 GNA["GATEWAY_NOT_AVAILABLE"]:::failed
145156 GQ["GATEWAY_QUEUED"]:::inprogress
146157 GS["GATEWAY_SENT"]:::success
147158 GF["GATEWAY_FAILED"]:::failed
148159 GR["GATEWAY_REJECTED"]:::failed
149- MLC{Message length check}
160+ TRUNCATE["Truncate message"]
150161 GWSEL{Gateway selection}
151162
152163 direction TB
153164 start[/Start/] --> |Initial state| unknown
154- unknown --> |Initial message checks| MLC
155- MLC --> |Message over length| MOS
156- MLC --> |Message within limits| GWSEL
157-
165+ unknown --> |Check gateway availability| GWSEL
158166 GWSEL --> |No gateway available to send this message| GNA
159- GWSEL --> |Message passed to Gateway| Gateway
167+ GWSEL --> |Gateway selected| TRUNCATE
168+ TRUNCATE --> |Message passed to Gateway| Gateway
160169
161170 subgraph Gateway
162171 GQ --> |The gateway rejected the message| GR
0 commit comments