diff --git a/masked-number/functions/relay-sms.protected.js b/masked-number/functions/relay-sms.protected.js index c3d9f801..91e14560 100644 --- a/masked-number/functions/relay-sms.protected.js +++ b/masked-number/functions/relay-sms.protected.js @@ -1,3 +1,29 @@ +/* + * Masking your phone number for SMS Forwarding and Responding + * + * Description: + * This function acts as a message-forwarding service + * If the message comes from the user, it forwards the message to another number. + * If it comes from someone else, it forwards it to the user. + * + * Contents: + * 1. Initialize Client and Response + * 2. Sender Check + * 3. Extracting Recipient and Message + * 4. Sending the Message + * 5. Handling Messages from Other Senders + */ + +/* + * 1. Initialize client and response + * + * Here you can initialize a Twilio client (client) to interact with Twilio's API. + * + * A twiml object is created to generate TwiML (Twilio Markup Language) responses, + * which are instructions that tell Twilio how to respond to an incoming message. + */ + +// Defines the main function handler for the Twilio Function. exports.handler = async function (context, event, callback) { const client = context.getTwilioClient(); const twiml = new Twilio.twiml.MessagingResponse();