Add option for allowing long sms in PromoSMS

This commit is contained in:
Łukasz Szczepański
2023-01-11 14:32:57 +01:00
parent 2172112144
commit ec30147a7f
4 changed files with 10 additions and 6 deletions

View File

@@ -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
};