dt-common-device 13.3.13 → 13.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -96,7 +96,7 @@ let TwilioService = (() => {
|
|
|
96
96
|
async sendSMS(data) {
|
|
97
97
|
const { propertyId, message, toNumber } = data;
|
|
98
98
|
if (!toNumber) {
|
|
99
|
-
|
|
99
|
+
throw new Error("To number is required for sending SMS");
|
|
100
100
|
}
|
|
101
101
|
//find fromNumber from the dt_connections table based on the propertyId
|
|
102
102
|
const response = await this.connectionRepository.queryConnections({
|
|
@@ -116,7 +116,7 @@ let TwilioService = (() => {
|
|
|
116
116
|
}
|
|
117
117
|
const smsEnabled = _settingsRes?.settings?.notificationPreferences?.smsNotification?.enabled;
|
|
118
118
|
if (!smsEnabled) {
|
|
119
|
-
|
|
119
|
+
throw new Error("SMS notifications are not enabled for this property");
|
|
120
120
|
}
|
|
121
121
|
//TODO: Need to do single tone pattern for the client
|
|
122
122
|
const client = (0, twilio_1.default)(clientId, clientSecret);
|