mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-03 12:02:33 +02:00
Fix sending apiv1 calls, fix passed arguments
This commit is contained in:
parent
23e8dc6375
commit
277213dad5
1 changed files with 21 additions and 18 deletions
|
@ -31,8 +31,7 @@ class SMSEagle extends NotificationProvider {
|
||||||
} else if (notification.smseagleRecipientType === "smseagle-to") {
|
} else if (notification.smseagleRecipientType === "smseagle-to") {
|
||||||
recipientType = "to";
|
recipientType = "to";
|
||||||
sendMethod = "/send_sms";
|
sendMethod = "/send_sms";
|
||||||
} else {
|
if (notification.smseagleMsgType != "smseagle-sms") {
|
||||||
recipientType = "to";
|
|
||||||
if (notification.smseagleDuration)
|
if (notification.smseagleDuration)
|
||||||
duration = notification.smseagleDuration;
|
duration = notification.smseagleDuration;
|
||||||
else
|
else
|
||||||
|
@ -47,17 +46,21 @@ class SMSEagle extends NotificationProvider {
|
||||||
voice_id = notification.smseagleTtsModel ? notification.smseagleTtsModel : 1;
|
voice_id = notification.smseagleTtsModel ? notification.smseagleTtsModel : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const url = new URL(notification.smseagleUrl + "/http_api" + sendMethod);
|
const url = new URL(notification.smseagleUrl + "/http_api" + sendMethod);
|
||||||
|
|
||||||
url.searchParams.append('access_token', notification.smseagleToken);
|
url.searchParams.append('access_token', notification.smseagleToken);
|
||||||
url.searchParams.append(recipientType, notification.smseagleRecipient);
|
url.searchParams.append(recipientType, notification.smseagleRecipient);
|
||||||
url.searchParams.append('message', msg);
|
if (!["smseagle-ring", "smseagle-tts", "smseagle-tts-advanced"].includes(notification.smseagleRecipientType)) {
|
||||||
url.searchParams.append('unicode', (notification.smseagleEncoding) ? "1" : "0");
|
url.searchParams.append('unicode', (notification.smseagleEncoding) ? "1" : "0");
|
||||||
url.searchParams.append('highpriority', (notification.smseaglePriority) ? notification.smseaglePriority : "0");
|
url.searchParams.append('highpriority', (notification.smseaglePriority) ? notification.smseaglePriority : "0");
|
||||||
if (duration) {
|
} else {
|
||||||
url.searchParams.append('duration', duration);
|
url.searchParams.append('duration', duration);
|
||||||
}
|
}
|
||||||
|
if (notification.smseagleRecipientType != "smseagle-ring") {
|
||||||
|
url.searchParams.append('message', msg);
|
||||||
|
}
|
||||||
if (voice_id) {
|
if (voice_id) {
|
||||||
url.searchParams.append('voice_id', voice_id);
|
url.searchParams.append('voice_id', voice_id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue