twilio-opencode

A lightweight express server to handle Twilio voice and messaging webhooks for prompting Opencode.
git clone https://unitehenry.com/git/twilio-opencode.git
Log | Files | Refs | README | LICENSE

commit 34bf05a5ff21f4e3575cd0fa6fb14c0f1d07d3a9
parent 4670f771ba2b739352dbdc6121da6bf231ad8c96
Author: Henry Unite <unitehenry@gmail.com>
Date:   Sat, 28 Feb 2026 05:14:51 +0000

chore: format

Diffstat:
Mvoice.ts | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/voice.ts b/voice.ts @@ -8,7 +8,7 @@ const HOLD_MUSIC_URL = "http://com.twilio.sounds.music.s3.amazonaws.com/MARKOVICHAMP-Borghestral.mp3"; function buildResponse(req: Request, message: string): string { - const origin = `${req.protocol}://${req.get('host')}`; + const origin = `${req.protocol}://${req.get("host")}`; return `<?xml version="1.0" encoding="UTF-8"?> <Response> @@ -96,7 +96,7 @@ export default async (req: Request, res: Response): Promise<void> => { const response = buildResponse(req, text); if (!twilioAuthToken) { - log('INFO', 'No auth token, responding to webhook'); + log("INFO", "No auth token, responding to webhook"); res.set("Content-Type", "text/xml"); @@ -107,11 +107,11 @@ export default async (req: Request, res: Response): Promise<void> => { const accountSid: string = req.body.AccountSid; - log('INFO', 'Creating twilio client', { accountSid }); + log("INFO", "Creating twilio client", { accountSid }); const twilioClient = twilio(accountSid, twilioAuthToken); - log('INFO', 'Updating twilio call', { callSid }); + log("INFO", "Updating twilio call", { callSid }); await twilioClient.calls(callSid).update({ twiml: response }); };