diff --git a/apps/meteor/app/sms/server/services/twilio.js b/apps/meteor/app/sms/server/services/twilio.js index dcc9b102118e..2579a9622c40 100644 --- a/apps/meteor/app/sms/server/services/twilio.js +++ b/apps/meteor/app/sms/server/services/twilio.js @@ -156,35 +156,36 @@ class Twilio { body = TAPi18n.__('Location', { lng: defaultLanguage }); } - let ContentSid; - let ContentVariables; - let MessagingServiceSid; + let contentSid; + let contentVariables; + let messagingServiceSid; if (extraData && extraData.contentSid) { - ContentSid = extraData.contentSid; - MessagingServiceSid = extraData.messagingServiceSid; + contentSid = extraData.contentSid; + messagingServiceSid = extraData.messagingServiceSid; } if (extraData && extraData.contentVariables) { - ContentVariables = JSON.stringify(extraData.contentVariables); + contentVariables = JSON.stringify(extraData.contentVariables); } if (!messageQueue[toNumber]) { messageQueue[toNumber] = []; } - if (!body && !mediaUrl && !ContentSid) { + if (!body && !mediaUrl && !contentSid) { return; } messageQueue[toNumber].push({ to: toNumber, - from: ContentSid ? MessagingServiceSid : fromNumber, + // from: contentSid ? messagingServiceSid : fromNumber, + from: fromNumber, body, ...(mediaUrl && { mediaUrl }), ...(persistentAction && { persistentAction }), - ...(ContentSid && { ContentSid }), - ...(MessagingServiceSid && { MessagingServiceSid }), - ...(ContentVariables && { ContentVariables }), + ...(contentSid && { contentSid }), + ...(messagingServiceSid && { messagingServiceSid }), + ...(contentVariables && { contentVariables }), }); SystemLogger.debug('Twillio Payload:', messageQueue[toNumber]);