mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 08:18:11 +08:00
Add option for allowing long sms in PromoSMS
This commit is contained in:
@@ -8,6 +8,10 @@ class PromoSMS extends NotificationProvider {
|
||||
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||
let okMsg = "Sent Successfully.";
|
||||
|
||||
if (notification.promosmsAllowLongSMS === undefined) {
|
||||
notification.promosmsAllowLongSMS = false
|
||||
}
|
||||
|
||||
try {
|
||||
let config = {
|
||||
headers: {
|
||||
@@ -20,7 +24,7 @@ class PromoSMS extends NotificationProvider {
|
||||
"recipients": [ notification.promosmsPhoneNumber ],
|
||||
//Lets remove non ascii char
|
||||
"text": msg.replace(/[^\x00-\x7F]/g, ""),
|
||||
"long-sms": notification.promosmsAllowLong,
|
||||
"long-sms": notification.promosmsAllowLongSMS,
|
||||
"type": Number(notification.promosmsSMSType),
|
||||
"sender": notification.promosmsSenderName
|
||||
};
|
||||
|
Reference in New Issue
Block a user