diff --git a/server/notification-providers/mobivatesms.js b/server/notification-providers/mobivatesms.js index ce6c767a8..7a03e62c7 100644 --- a/server/notification-providers/mobivatesms.js +++ b/server/notification-providers/mobivatesms.js @@ -16,18 +16,22 @@ class MobivateSMS extends NotificationProvider { let cleanMsg = msg.replace(/[^\x00-\x7F]/g, "").substring(0, 639); let data = { - "originator": notification.mobivateOriginator.substring(0, 15), - "recipients": notification.mobivateRecipients.split(",").map(n => n.replace(/[^0-9]/g, "")).filter(n => n.length >= 9).map(recipient => ({recipient})), - "text": cleanMsg + originator: notification.mobivateOriginator.substring(0, 15), + recipients: notification.mobivateRecipients + .split(",") + .map((n) => n.replace(/[^0-9]/g, "")) + .filter((n) => n.length >= 9) + .map((recipient) => ({ recipient })), + text: cleanMsg, }; let config = { headers: { "Content-Type": "application/json", "cache-control": "no-cache", - "Accept": "application/json", - "Authorization": "Bearer " + notification.mobivateApikey - } + Accept: "application/json", + Authorization: "Bearer " + notification.mobivateApikey, + }, }; config = this.getAxiosConfigWithProxy(config); diff --git a/src/components/notifications/MobivateSMS.vue b/src/components/notifications/MobivateSMS.vue index 10cb8e55d..d5c44bc94 100644 --- a/src/components/notifications/MobivateSMS.vue +++ b/src/components/notifications/MobivateSMS.vue @@ -1,18 +1,44 @@