From c154d8b2148944eeee8477388ae5ac7b1764f15f Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Thu, 27 Feb 2025 09:03:15 +0100 Subject: [PATCH 01/16] Updated support for SMSEagle APIv2 notifications --- server/notification-providers/smseagle.js | 51 +++++++++++++---------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/server/notification-providers/smseagle.js b/server/notification-providers/smseagle.js index 4e897006c..68d585ee8 100644 --- a/server/notification-providers/smseagle.js +++ b/server/notification-providers/smseagle.js @@ -13,56 +13,61 @@ class SMSEagle extends NotificationProvider { try { let config = { headers: { + "access-token": notification.smseagleToken, "Content-Type": "application/json", } }; let postData; - let sendMethod; let recipientType; - let encoding = (notification.smseagleEncoding) ? "1" : "0"; - let priority = (notification.smseaglePriority) ? notification.smseaglePriority : "0"; + let encoding = (notification.smseagleEncoding) ? "unicode" : "standard"; + let priority = (notification.smseaglePriority) ? notification.smseaglePriority : 0; + let recipientList = notification.smseagleRecipient.split(","); if (notification.smseagleRecipientType === "smseagle-contact") { - recipientType = "contactname"; - sendMethod = "sms.send_tocontact"; + recipientType = "contacts"; + recipientList = recipientList.map(e => { + return Number(e) + }); } if (notification.smseagleRecipientType === "smseagle-group") { - recipientType = "groupname"; - sendMethod = "sms.send_togroup"; + recipientType = "groups"; + recipientList = recipientList.map(e => { + return Number(e) + }); } if (notification.smseagleRecipientType === "smseagle-to") { recipientType = "to"; - sendMethod = "sms.send_sms"; } - let params = { - access_token: notification.smseagleToken, - [recipientType]: notification.smseagleRecipient, - message: msg, - responsetype: "extended", - unicode: encoding, - highpriority: priority - }; - postData = { - method: sendMethod, - params: params + [recipientType]: recipientList, + text: msg, + encoding: encoding, + priority: priority }; - let resp = await axios.post(notification.smseagleUrl + "/jsonrpc/sms", postData, config); + let resp = await axios.post(notification.smseagleUrl + "/api/v2/messages/sms", postData, config); - if ((JSON.stringify(resp.data)).indexOf("message_id") === -1) { + let countAll = resp.data.length; + let countQueued = resp.data.filter(x => x.status == "queued").length; + + if (resp.status !== 200 || countQueued == 0) { let error = ""; - if (resp.data.result && resp.data.result.error_text) { - error = `SMSEagle API returned error: ${JSON.stringify(resp.data.result.error_text)}`; + if (resp.data.length > 0) { + error = `SMSEagle API returned error: ${JSON.stringify(resp.data)}`; } else { error = "SMSEagle API returned an unexpected response"; } throw new Error(error); } + if (countAll !== countQueued) { + let okWithErrorsMsg = "Sent " + countQueued + "/" + countAll + " Messages Successfully."; + return okWithErrorsMsg; + } + return okMsg; } catch (error) { this.throwGeneralAxiosError(error); From e0f25eba608881f4eb53d3897882c421c97a399f Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Thu, 27 Feb 2025 16:46:12 +0100 Subject: [PATCH 02/16] Updated form to send simultaneously to phone, groups and contacts --- server/notification-providers/smseagle.js | 51 +++++++++++++---------- src/components/notifications/SMSEagle.vue | 19 +++++---- 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/server/notification-providers/smseagle.js b/server/notification-providers/smseagle.js index 68d585ee8..fe91a5597 100644 --- a/server/notification-providers/smseagle.js +++ b/server/notification-providers/smseagle.js @@ -18,36 +18,43 @@ class SMSEagle extends NotificationProvider { } }; - let postData; - let recipientType; - let encoding = (notification.smseagleEncoding) ? "unicode" : "standard"; let priority = (notification.smseaglePriority) ? notification.smseaglePriority : 0; - let recipientList = notification.smseagleRecipient.split(","); - if (notification.smseagleRecipientType === "smseagle-contact") { - recipientType = "contacts"; - recipientList = recipientList.map(e => { - return Number(e) - }); - } - if (notification.smseagleRecipientType === "smseagle-group") { - recipientType = "groups"; - recipientList = recipientList.map(e => { - return Number(e) - }); - } - if (notification.smseagleRecipientType === "smseagle-to") { - recipientType = "to"; - } - - postData = { - [recipientType]: recipientList, + let postData = { text: msg, encoding: encoding, priority: priority }; + let to = notification.smseagleRecipientTo; + let contacts = notification.smseagleRecipientContact; + let groups = notification.smseagleRecipientGroup; + console.log("b", to, contacts, groups); + + if (contacts) { + contacts = contacts.split(","); + contacts = contacts.map(e => { + return Number(e) + }); + postData["contacts"] = contacts; + } + + if (groups) { + groups = groups.split(","); + groups = groups.map(e => { + return Number(e) + }); + postData["groups"] = groups; + } + + if (to) { + to = to.split(","); + postData["to"] = to; + } + + console.log(postData); + let resp = await axios.post(notification.smseagleUrl + "/api/v2/messages/sms", postData, config); let countAll = resp.data.length; diff --git a/src/components/notifications/SMSEagle.vue b/src/components/notifications/SMSEagle.vue index ec781313a..e753fae36 100644 --- a/src/components/notifications/SMSEagle.vue +++ b/src/components/notifications/SMSEagle.vue @@ -8,16 +8,19 @@
- - + +
+
+ +
- - + + +
+
+ +
From 19cbf18a99ee5ed1f268167cc5bbabfbd1d8a29a Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Fri, 28 Feb 2025 12:45:33 +0100 Subject: [PATCH 03/16] Add ring calls, tts and tts advanced calls --- server/notification-providers/smseagle.js | 25 ++++++++++++++++++++--- src/components/notifications/SMSEagle.vue | 17 +++++++++++++++ src/lang/en.json | 13 +++++++++--- src/lang/pl.json | 13 +++++++++--- 4 files changed, 59 insertions(+), 9 deletions(-) diff --git a/server/notification-providers/smseagle.js b/server/notification-providers/smseagle.js index fe91a5597..91cd2e4bf 100644 --- a/server/notification-providers/smseagle.js +++ b/server/notification-providers/smseagle.js @@ -30,7 +30,6 @@ class SMSEagle extends NotificationProvider { let to = notification.smseagleRecipientTo; let contacts = notification.smseagleRecipientContact; let groups = notification.smseagleRecipientGroup; - console.log("b", to, contacts, groups); if (contacts) { contacts = contacts.split(","); @@ -53,9 +52,29 @@ class SMSEagle extends NotificationProvider { postData["to"] = to; } - console.log(postData); + let endpoint = "/messages/sms"; - let resp = await axios.post(notification.smseagleUrl + "/api/v2/messages/sms", postData, config); + if (notification.smseagleMsgType != "smseagle-sms") { + + let duration; + if (notification.smseagleDuration) + duration = notification.smseagleDuration + else + duration = 10; + + postData["duration"] = duration; + + if (notification.smseagleMsgType == "smseagle-ring") { + endpoint = "/calls/ring"; + } else if (notification.smseagleMsgType == "smseagle-tts") { + endpoint = "/calls/tts"; + } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { + endpoint = "/calls/tts_advanced"; + postData["voice_id"] = notification.smseagleTtsModel; + } + } + + let resp = await axios.post(notification.smseagleUrl + "/api/v2" + endpoint, postData, config); let countAll = resp.data.length; let countQueued = resp.data.filter(x => x.status == "queued").length; diff --git a/src/components/notifications/SMSEagle.vue b/src/components/notifications/SMSEagle.vue index e753fae36..a4cb6d39e 100644 --- a/src/components/notifications/SMSEagle.vue +++ b/src/components/notifications/SMSEagle.vue @@ -30,6 +30,23 @@
+
+ + +
+
+ + +
+
+ + +
From 3233ce47460003b231edbe480d3c9a8256768c1f Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Wed, 26 Mar 2025 12:52:52 +0100 Subject: [PATCH 08/16] Fix showing TTS model bug,add default TTS model. --- server/notification-providers/smseagle.js | 4 ++-- src/components/notifications/SMSEagle.vue | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/server/notification-providers/smseagle.js b/server/notification-providers/smseagle.js index 4989408bb..5dd6cfeb8 100644 --- a/server/notification-providers/smseagle.js +++ b/server/notification-providers/smseagle.js @@ -44,7 +44,7 @@ class SMSEagle extends NotificationProvider { sendMethod = "/tts_call"; } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { sendMethod = "/tts_adv_call"; - voice_id = notification.smseagleTtsModel; + voice_id = notification.smseagleTtsModel ? notification.smseagleTtsModel : 1 ; } } @@ -130,7 +130,7 @@ class SMSEagle extends NotificationProvider { endpoint = "/calls/tts"; } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { endpoint = "/calls/tts_advanced"; - postData["voice_id"] = notification.smseagleTtsModel; + postData["voice_id"] = notification.smseagleTtsModel ? notification.smseagleTtsModel : "1" ; } } diff --git a/src/components/notifications/SMSEagle.vue b/src/components/notifications/SMSEagle.vue index 6286628a2..cc0e5e83f 100644 --- a/src/components/notifications/SMSEagle.vue +++ b/src/components/notifications/SMSEagle.vue @@ -45,18 +45,19 @@ - -
- - -
-
- - +
+ + +
+
+ + +
+
@@ -96,7 +97,7 @@
- +
From 23e8dc6375cc4e49e55bd818efbc6f24d311748f Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Wed, 26 Mar 2025 14:43:38 +0100 Subject: [PATCH 09/16] Change default choice to APIv1 for backwards compability --- src/components/notifications/SMSEagle.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/notifications/SMSEagle.vue b/src/components/notifications/SMSEagle.vue index cc0e5e83f..19ede31dd 100644 --- a/src/components/notifications/SMSEagle.vue +++ b/src/components/notifications/SMSEagle.vue @@ -111,7 +111,7 @@ export default { }, mounted() { if (!this.$parent.notification.smseagleApiType) { - this.$parent.notification.smseagleApiType = 'smseagle-apiv2'; + this.$parent.notification.smseagleApiType = 'smseagle-apiv1'; } if (!this.$parent.notification.smseagleMsgType) { this.$parent.notification.smseagleMsgType = 'smseagle-sms'; From 277213dad5090b6f0fc4487e4cdbe15f226b37a2 Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Mon, 31 Mar 2025 10:18:22 +0200 Subject: [PATCH 10/16] Fix sending apiv1 calls, fix passed arguments --- server/notification-providers/smseagle.js | 39 ++++++++++++----------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/server/notification-providers/smseagle.js b/server/notification-providers/smseagle.js index 5dd6cfeb8..d2ebdcafe 100644 --- a/server/notification-providers/smseagle.js +++ b/server/notification-providers/smseagle.js @@ -31,20 +31,20 @@ class SMSEagle extends NotificationProvider { } else if (notification.smseagleRecipientType === "smseagle-to") { recipientType = "to"; sendMethod = "/send_sms"; - } else { - recipientType = "to"; - if (notification.smseagleDuration) - duration = notification.smseagleDuration; - else - duration = 10; + if (notification.smseagleMsgType != "smseagle-sms") { + if (notification.smseagleDuration) + duration = notification.smseagleDuration; + else + duration = 10; - if (notification.smseagleMsgType == "smseagle-ring") { - sendMethod = "/ring_call"; - } else if (notification.smseagleMsgType == "smseagle-tts") { - sendMethod = "/tts_call"; - } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { - sendMethod = "/tts_adv_call"; - voice_id = notification.smseagleTtsModel ? notification.smseagleTtsModel : 1 ; + if (notification.smseagleMsgType == "smseagle-ring") { + sendMethod = "/ring_call"; + } else if (notification.smseagleMsgType == "smseagle-tts") { + sendMethod = "/tts_call"; + } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { + sendMethod = "/tts_adv_call"; + voice_id = notification.smseagleTtsModel ? notification.smseagleTtsModel : 1; + } } } @@ -52,12 +52,15 @@ class SMSEagle extends NotificationProvider { url.searchParams.append('access_token', notification.smseagleToken); url.searchParams.append(recipientType, notification.smseagleRecipient); - url.searchParams.append('message', msg); - url.searchParams.append('unicode', (notification.smseagleEncoding) ? "1" : "0"); - url.searchParams.append('highpriority', (notification.smseaglePriority) ? notification.smseaglePriority : "0"); - if (duration) { + if (!["smseagle-ring", "smseagle-tts", "smseagle-tts-advanced"].includes(notification.smseagleRecipientType)) { + url.searchParams.append('unicode', (notification.smseagleEncoding) ? "1" : "0"); + url.searchParams.append('highpriority', (notification.smseaglePriority) ? notification.smseaglePriority : "0"); + } else { url.searchParams.append('duration', duration); } + if (notification.smseagleRecipientType != "smseagle-ring") { + url.searchParams.append('message', msg); + } if (voice_id) { url.searchParams.append('voice_id', voice_id); } @@ -130,7 +133,7 @@ class SMSEagle extends NotificationProvider { endpoint = "/calls/tts"; } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { endpoint = "/calls/tts_advanced"; - postData["voice_id"] = notification.smseagleTtsModel ? notification.smseagleTtsModel : "1" ; + postData["voice_id"] = notification.smseagleTtsModel ? notification.smseagleTtsModel : "1"; } } From 6056c91d74a2bd9817906585a9795381c6e0a043 Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Mon, 31 Mar 2025 11:24:59 +0200 Subject: [PATCH 11/16] Change translations for APIv1 and APIv2 --- src/components/notifications/SMSEagle.vue | 4 ++-- src/lang/en.json | 6 ++++-- src/lang/pl.json | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/notifications/SMSEagle.vue b/src/components/notifications/SMSEagle.vue index 19ede31dd..547870cc2 100644 --- a/src/components/notifications/SMSEagle.vue +++ b/src/components/notifications/SMSEagle.vue @@ -67,11 +67,11 @@
- +
- +
diff --git a/src/lang/en.json b/src/lang/en.json index d06e73d69..4375032d6 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -755,8 +755,10 @@ "serwersmsPhoneNumber": "Phone number", "serwersmsSenderName": "SMS Sender Name (registered via customer portal)", "smseagleTo": "Phone number(s)", - "smseagleGroup": "Phonebook group ID(s)", - "smseagleContact": "Phonebook contact ID(s)", + "smseagleGroup": "Phonebook group name(s)", + "smseagleContact": "Phonebook contact name(s)", + "smseagleGroupV2": "Phonebook group ID(s)", + "smseagleContactV2": "Phonebook contact ID(s)", "smseagleRecipientType": "Recipient type", "smseagleRecipient": "Recipient(s) (multiple must be separated with comma)", "smseagleToken": "API Access token", diff --git a/src/lang/pl.json b/src/lang/pl.json index a3bb9a9e7..180ecf61e 100644 --- a/src/lang/pl.json +++ b/src/lang/pl.json @@ -363,8 +363,10 @@ "serwersmsSenderName": "Nazwa nadawcy (zatwierdzona w panelu klienta)", "smseagle": "SMSEagle", "smseagleTo": "Numer/y telefonu", - "smseagleGroup": "Grupa/y z Książki adresowej - ID", - "smseagleContact": "Kontakt/y z Książki adresowej - ID", + "smseagleGroup": "Grupa/y z Książki adresowej", + "smseagleContact": "Kontakt/y z Książki adresowej", + "smseagleGroupV2": "Grupa/y z Książki adresowej - ID", + "smseagleContactV2": "Kontakt/y z Książki adresowej - ID", "smseagleRecipientType": "Typ odbiorcy", "smseagleRecipient": "Odbiorca/y (wiele musi być oddzielone przecinkami)", "smseagleToken": "Klucz dostępu API", From e09b027450dffb68637510194e492e370c1efc44 Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Mon, 31 Mar 2025 11:44:24 +0200 Subject: [PATCH 12/16] Add hiding unicode checkbox --- src/components/notifications/SMSEagle.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/notifications/SMSEagle.vue b/src/components/notifications/SMSEagle.vue index 547870cc2..ff7834f6e 100644 --- a/src/components/notifications/SMSEagle.vue +++ b/src/components/notifications/SMSEagle.vue @@ -33,7 +33,8 @@
-
+
From 6164cff8e7978a13bc7d169a1c3ea5b768ebf5f2 Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Mon, 7 Apr 2025 14:38:04 +0200 Subject: [PATCH 13/16] Add ESLint formatting --- server/notification-providers/smseagle.js | 63 ++++++++++++----------- src/components/notifications/SMSEagle.vue | 54 +++++++++++-------- src/lang/pl.json | 6 +-- 3 files changed, 68 insertions(+), 55 deletions(-) diff --git a/server/notification-providers/smseagle.js b/server/notification-providers/smseagle.js index d2ebdcafe..9db7918b4 100644 --- a/server/notification-providers/smseagle.js +++ b/server/notification-providers/smseagle.js @@ -11,7 +11,7 @@ class SMSEagle extends NotificationProvider { const okMsg = "Sent Successfully."; try { - if (notification.smseagleApiType === "smseagle-apiv1") { + if (notification.smseagleApiType === "smseagle-apiv1") { // according to https://www.smseagle.eu/apiv1/ let config = { headers: { "Content-Type": "application/x-www-form-urlencoded", @@ -20,7 +20,8 @@ class SMSEagle extends NotificationProvider { let sendMethod; let recipientType; - let duration, voice_id; + let duration; + let voiceId; if (notification.smseagleRecipientType === "smseagle-contact") { recipientType = "contactname"; @@ -31,38 +32,39 @@ class SMSEagle extends NotificationProvider { } else if (notification.smseagleRecipientType === "smseagle-to") { recipientType = "to"; sendMethod = "/send_sms"; - if (notification.smseagleMsgType != "smseagle-sms") { - if (notification.smseagleDuration) + if (notification.smseagleMsgType !== "smseagle-sms") { + if (notification.smseagleDuration) { duration = notification.smseagleDuration; - else + } else { duration = 10; + } - if (notification.smseagleMsgType == "smseagle-ring") { + if (notification.smseagleMsgType === "smseagle-ring") { sendMethod = "/ring_call"; - } else if (notification.smseagleMsgType == "smseagle-tts") { + } else if (notification.smseagleMsgType === "smseagle-tts") { sendMethod = "/tts_call"; - } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { + } else if (notification.smseagleMsgType === "smseagle-tts-advanced") { sendMethod = "/tts_adv_call"; - voice_id = notification.smseagleTtsModel ? notification.smseagleTtsModel : 1; + voiceId = notification.smseagleTtsModel ? notification.smseagleTtsModel : 1; } } } 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); - if (!["smseagle-ring", "smseagle-tts", "smseagle-tts-advanced"].includes(notification.smseagleRecipientType)) { - url.searchParams.append('unicode', (notification.smseagleEncoding) ? "1" : "0"); - url.searchParams.append('highpriority', (notification.smseaglePriority) ? notification.smseaglePriority : "0"); + if (![ "smseagle-ring", "smseagle-tts", "smseagle-tts-advanced" ].includes(notification.smseagleRecipientType)) { + url.searchParams.append("access_token", (notification.smseagleEncoding) ? "1" : "0"); + url.searchParams.append("access_token", (notification.smseaglePriority) ? notification.smseaglePriority : "0"); } else { - url.searchParams.append('duration', duration); + url.searchParams.append("duration", duration); } - if (notification.smseagleRecipientType != "smseagle-ring") { - url.searchParams.append('message', msg); + if (notification.smseagleRecipientType !== "smseagle-ring") { + url.searchParams.append("message", msg); } - if (voice_id) { - url.searchParams.append('voice_id', voice_id); + if (voiceId) { + url.searchParams.append("voice_id", voiceId); } let resp = await axios.get(url.toString(), config); @@ -73,7 +75,7 @@ class SMSEagle extends NotificationProvider { } return okMsg; - } else if (notification.smseagleApiType === "smseagle-apiv2") { + } else if (notification.smseagleApiType === "smseagle-apiv2") { // according to https://www.smseagle.eu/docs/apiv2/ let config = { headers: { "access-token": notification.smseagleToken, @@ -97,7 +99,7 @@ class SMSEagle extends NotificationProvider { if (contacts) { contacts = contacts.split(","); contacts = contacts.map(e => { - return Number(e) + return Number(e); }); postData["contacts"] = contacts; } @@ -105,7 +107,7 @@ class SMSEagle extends NotificationProvider { if (groups) { groups = groups.split(","); groups = groups.map(e => { - return Number(e) + return Number(e); }); postData["groups"] = groups; } @@ -117,21 +119,22 @@ class SMSEagle extends NotificationProvider { let endpoint = "/messages/sms"; - if (notification.smseagleMsgType != "smseagle-sms") { + if (notification.smseagleMsgType !== "smseagle-sms") { let duration; - if (notification.smseagleDuration) - duration = notification.smseagleDuration - else + if (notification.smseagleDuration) { + duration = notification.smseagleDuration; + } else { duration = 10; + } postData["duration"] = duration; - if (notification.smseagleMsgType == "smseagle-ring") { + if (notification.smseagleMsgType === "smseagle-ring") { endpoint = "/calls/ring"; - } else if (notification.smseagleMsgType == "smseagle-tts") { + } else if (notification.smseagleMsgType === "smseagle-tts") { endpoint = "/calls/tts"; - } else if (notification.smseagleMsgType == "smseagle-tts-advanced") { + } else if (notification.smseagleMsgType === "smseagle-tts-advanced") { endpoint = "/calls/tts_advanced"; postData["voice_id"] = notification.smseagleTtsModel ? notification.smseagleTtsModel : "1"; } @@ -140,9 +143,9 @@ class SMSEagle extends NotificationProvider { let resp = await axios.post(notification.smseagleUrl + "/api/v2" + endpoint, postData, config); let countAll = resp.data.length; - let countQueued = resp.data.filter(x => x.status == "queued").length; + let countQueued = resp.data.filter(x => x.status === "queued").length; - if (resp.status !== 200 || countQueued == 0) { + if (resp.status !== 200 || countQueued === 0) { let error = ""; if (resp.data.length > 0) { error = `SMSEagle API returned error: ${JSON.stringify(resp.data)}`; diff --git a/src/components/notifications/SMSEagle.vue b/src/components/notifications/SMSEagle.vue index ff7834f6e..c59abe3a6 100644 --- a/src/components/notifications/SMSEagle.vue +++ b/src/components/notifications/SMSEagle.vue @@ -1,8 +1,10 @@ @@ -112,13 +122,13 @@ export default { }, mounted() { if (!this.$parent.notification.smseagleApiType) { - this.$parent.notification.smseagleApiType = 'smseagle-apiv1'; + this.$parent.notification.smseagleApiType = "smseagle-apiv1"; } if (!this.$parent.notification.smseagleMsgType) { - this.$parent.notification.smseagleMsgType = 'smseagle-sms'; + this.$parent.notification.smseagleMsgType = "smseagle-sms"; } if (!this.$parent.notification.smseagleRecipientType) { - this.$parent.notification.smseagleRecipientType = 'smseagle-to'; + this.$parent.notification.smseagleRecipientType = "smseagle-to"; } } }; diff --git a/src/lang/pl.json b/src/lang/pl.json index 180ecf61e..739afeecd 100644 --- a/src/lang/pl.json +++ b/src/lang/pl.json @@ -363,8 +363,8 @@ "serwersmsSenderName": "Nazwa nadawcy (zatwierdzona w panelu klienta)", "smseagle": "SMSEagle", "smseagleTo": "Numer/y telefonu", - "smseagleGroup": "Grupa/y z Książki adresowej", - "smseagleContact": "Kontakt/y z Książki adresowej", + "smseagleGroup": "Grupa/y z Książki adresowej - nazwa", + "smseagleContact": "Kontakt/y z Książki adresowej - nazwa", "smseagleGroupV2": "Grupa/y z Książki adresowej - ID", "smseagleContactV2": "Kontakt/y z Książki adresowej - ID", "smseagleRecipientType": "Typ odbiorcy", @@ -380,7 +380,7 @@ "smseagleMsgTtsAdvanced": "Połączenie text-to-speech (zaawansowane)", "smseagleDuration": "Czas trwania (domyślnie=10)", "smseagleTtsModel": "ID modelu głosowego TTS", - "smseagleApiType": "wersja API", + "smseagleApiType": "Wersja API", "smseagleApiv1": "APIv1 (dla istniejących projektów)", "smseagleApiv2": "APIv2 (zalecane dla nowych integracji)", "stackfield": "Stackfield", From f59062c072cbdeb4fb2f5bb895b93584962d3fe8 Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Mon, 7 Apr 2025 14:38:04 +0200 Subject: [PATCH 14/16] Add ESLint formatting --- server/notification-providers/smseagle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/notification-providers/smseagle.js b/server/notification-providers/smseagle.js index 9db7918b4..7946a73a0 100644 --- a/server/notification-providers/smseagle.js +++ b/server/notification-providers/smseagle.js @@ -55,8 +55,8 @@ class SMSEagle extends NotificationProvider { url.searchParams.append("access_token", notification.smseagleToken); url.searchParams.append(recipientType, notification.smseagleRecipient); if (![ "smseagle-ring", "smseagle-tts", "smseagle-tts-advanced" ].includes(notification.smseagleRecipientType)) { - url.searchParams.append("access_token", (notification.smseagleEncoding) ? "1" : "0"); - url.searchParams.append("access_token", (notification.smseaglePriority) ? notification.smseaglePriority : "0"); + url.searchParams.append("unicode", (notification.smseagleEncoding) ? "1" : "0"); + url.searchParams.append("highpriority", (notification.smseaglePriority) ? notification.smseaglePriority : "0"); } else { url.searchParams.append("duration", duration); } From 86f039bd3016adcbd7305786d6c6c015571d43da Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Mon, 7 Apr 2025 15:21:20 +0200 Subject: [PATCH 15/16] Fix pl.json empty line --- src/lang/pl.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lang/pl.json b/src/lang/pl.json index 739afeecd..cc4fa953d 100644 --- a/src/lang/pl.json +++ b/src/lang/pl.json @@ -365,8 +365,8 @@ "smseagleTo": "Numer/y telefonu", "smseagleGroup": "Grupa/y z Książki adresowej - nazwa", "smseagleContact": "Kontakt/y z Książki adresowej - nazwa", - "smseagleGroupV2": "Grupa/y z Książki adresowej - ID", - "smseagleContactV2": "Kontakt/y z Książki adresowej - ID", + "smseagleGroupApiv2": "Grupa/y z Książki adresowej - ID", + "smseagleContactApiv2": "Kontakt/y z Książki adresowej - ID", "smseagleRecipientType": "Typ odbiorcy", "smseagleRecipient": "Odbiorca/y (wiele musi być oddzielone przecinkami)", "smseagleToken": "Klucz dostępu API", @@ -1111,4 +1111,4 @@ "RabbitMQ Password": "Hasło RabbitMQ", "SendGrid API Key": "Klucz API SendGrid", "Separate multiple email addresses with commas": "Oddziel wiele adresów e-mail przecinkami" -} \ No newline at end of file +} From 213c4c03426a4e5e4e0517b8722951bf7bb49a26 Mon Sep 17 00:00:00 2001 From: AxeKam333 Date: Mon, 7 Apr 2025 15:27:09 +0200 Subject: [PATCH 16/16] Delete pl.json changes --- src/lang/pl.json | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/lang/pl.json b/src/lang/pl.json index cc4fa953d..9832fb7c1 100644 --- a/src/lang/pl.json +++ b/src/lang/pl.json @@ -363,26 +363,14 @@ "serwersmsSenderName": "Nazwa nadawcy (zatwierdzona w panelu klienta)", "smseagle": "SMSEagle", "smseagleTo": "Numer/y telefonu", - "smseagleGroup": "Grupa/y z Książki adresowej - nazwa", - "smseagleContact": "Kontakt/y z Książki adresowej - nazwa", - "smseagleGroupApiv2": "Grupa/y z Książki adresowej - ID", - "smseagleContactApiv2": "Kontakt/y z Książki adresowej - ID", + "smseagleGroup": "Grupa/y z Książki adresowej", + "smseagleContact": "Kontakt/y z Książki adresowej", "smseagleRecipientType": "Typ odbiorcy", "smseagleRecipient": "Odbiorca/y (wiele musi być oddzielone przecinkami)", "smseagleToken": "Klucz dostępu API", "smseagleUrl": "URL Twojego urządzenia SMSEagle", "smseagleEncoding": "Wyślij jako Unicode", "smseaglePriority": "Priorytet wiadomości (0-9, domyślnie = 0)", - "smseagleMsgType": "Typ wiadomości", - "smseagleMsgSms": "Wiadomość sms (domyślnie)", - "smseagleMsgRing": "Tylko połączenie", - "smseagleMsgTts": "Połączenie text-to-speech (proste)", - "smseagleMsgTtsAdvanced": "Połączenie text-to-speech (zaawansowane)", - "smseagleDuration": "Czas trwania (domyślnie=10)", - "smseagleTtsModel": "ID modelu głosowego TTS", - "smseagleApiType": "Wersja API", - "smseagleApiv1": "APIv1 (dla istniejących projektów)", - "smseagleApiv2": "APIv2 (zalecane dla nowych integracji)", "stackfield": "Stackfield", "Customize": "Dostosuj", "Custom Footer": "Niestandardowa stopka",