mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 04:04:41 -05:00
Add option for allowing long sms in PromoSMS
This commit is contained in:
parent
2172112144
commit
ec30147a7f
@ -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
|
||||
};
|
||||
|
@ -26,9 +26,9 @@
|
||||
<label for="promosms-sender-name" class="form-label">{{ $t("promosmsSMSSender") }}</label>
|
||||
<input id="promosms-sender-name" v-model="$parent.notification.promosmsSenderName" type="text" minlength="3" maxlength="11" class="form-control">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="promosms-allow-long" class="form-label">{{ $t("promosmsAllowLong") }}</label>
|
||||
<input id="promosms-allow-long" v-model="$parent.notification.promosmsAllowLong" type="checkbox" class="form-control" checked>
|
||||
<div class="form-check form-switch">
|
||||
<input id="promosms-allow-long" v-model="$parent.notification.promosmsAllowLongSMS" type="checkbox" class="form-check-input">
|
||||
<label for="promosms-allow-long" class="form-label">{{ $t("promosmsAllowLongSMS") }}</label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -320,7 +320,7 @@ export default {
|
||||
promosmsTypeSpeed: "SMS SPEED - Highest priority in system. Very quick and reliable but costly (about twice of SMS FULL price).",
|
||||
promosmsPhoneNumber: "Phone number (for Polish recipient You can skip area codes)",
|
||||
promosmsSMSSender: "SMS Sender Name : Pre-registred name or one of defaults: InfoSMS, SMS Info, MaxSMS, INFO, SMS",
|
||||
promosmsAllowLong: "Allow long messages",
|
||||
promosmsAllowLongSMS: "Allow long SMS",
|
||||
"Feishu WebHookUrl": "Feishu WebHookURL",
|
||||
matrixHomeserverURL: "Homeserver URL (with http(s):// and optionally port)",
|
||||
"Internal Room Id": "Internal Room ID",
|
||||
|
@ -284,7 +284,7 @@ export default {
|
||||
promosmsTypeSpeed: "SMS SPEED - wysyłka priorytetowa, ma wszystkie zalety SMS FULL",
|
||||
promosmsPhoneNumber: "Numer odbiorcy",
|
||||
promosmsSMSSender: "Nadawca SMS (wcześniej zatwierdzone nazwy z panelu PromoSMS)",
|
||||
promosmsAllowLong: "Zezwól na długie wiadomości",
|
||||
promosmsAllowLongSMS: "Zezwól na długie SMSy",
|
||||
"Primary Base URL": "Główny URL",
|
||||
"Push URL": "Push URL",
|
||||
needPushEvery: "Powinieneś wywoływać ten URL co {0} sekund",
|
||||
|
Loading…
Reference in New Issue
Block a user