diff --git a/server/notification-providers/serwersms.js b/server/notification-providers/serwersms.js index 24f4ed5c..a99c8332 100644 --- a/server/notification-providers/serwersms.js +++ b/server/notification-providers/serwersms.js @@ -21,11 +21,16 @@ class SerwerSMS extends NotificationProvider { let data = { "username": notification.serwersmsUsername, "password": notification.serwersmsPassword, - "phone": notification.serwersmsPhoneNumber, "text": msg.replace(/[^\x00-\x7F]/g, ""), "sender": notification.serwersmsSenderName, }; + if (notification.serwersmsRecipientType === "group") { + data.group_id = notification.serwersmsGroupId; + } else { + data.phone = notification.serwersmsPhoneNumber; + } + let resp = await axios.post(url, data, config); if (!resp.data.success) { diff --git a/src/components/notifications/SerwerSMS.vue b/src/components/notifications/SerwerSMS.vue index 32a0ff7a..3afc4a19 100644 --- a/src/components/notifications/SerwerSMS.vue +++ b/src/components/notifications/SerwerSMS.vue @@ -8,9 +8,21 @@
+ + +
+
+
+ + +
{{ $t("serwersmsGroupIdHelptext") }}
+
diff --git a/src/lang/en.json b/src/lang/en.json index b7763bc6..f1309857 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -808,6 +808,11 @@ "serwersmsAPIUser": "API Username (incl. webapi_ prefix)", "serwersmsAPIPassword": "API Password", "serwersmsPhoneNumber": "Phone number", + "serwersmsRecipientType": "Recipient type", + "serwersmsRecipientTypePhone": "Phone number", + "serwersmsRecipientTypeGroup": "Group", + "serwersmsGroupId": "Group ID", + "serwersmsGroupIdHelptext": "ID or group IDs in the Customer Panel. These identifiers can be downloaded using action groups / index or by copying them from the editing group in the Customer Panel.", "serwersmsSenderName": "SMS Sender Name (registered via customer portal)", "smseagleTo": "Phone number(s)", "smseagleGroup": "Phonebook group name(s)",