@@ -81,6 +81,18 @@ See MDL-81015 for more information on this feature.
81
81
82
82
:::
83
83
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
+
84
96
## Fetching messages
85
97
86
98
Every sent message is stored in the database to support status checks, and for subsequent reporting.
@@ -140,23 +152,20 @@ graph TD
140
152
classDef success fill:green,color:white,font-weight:bold
141
153
142
154
unknown["UNKNOWN"]
143
- MOS["MESSAGE_OVER_SIZE"]:::failed
144
155
GNA["GATEWAY_NOT_AVAILABLE"]:::failed
145
156
GQ["GATEWAY_QUEUED"]:::inprogress
146
157
GS["GATEWAY_SENT"]:::success
147
158
GF["GATEWAY_FAILED"]:::failed
148
159
GR["GATEWAY_REJECTED"]:::failed
149
- MLC{Message length check}
160
+ TRUNCATE["Truncate message"]
150
161
GWSEL{Gateway selection}
151
162
152
163
direction TB
153
164
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
158
166
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
160
169
161
170
subgraph Gateway
162
171
GQ --> |The gateway rejected the message| GR
0 commit comments