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