mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-02-14 10:19:07 +00:00
merge features from hosted branch (#32)
major merge of features from the hosted branch that was created temporarily during the initial launch of jambonz.org
This commit is contained in:
@@ -13,11 +13,14 @@ router.post('/:partner', async(req, res) => {
|
||||
logger.debug({body: req.body}, `got incomingSms request from partner ${req.params.partner}`);
|
||||
|
||||
let tasks;
|
||||
const {srf} = require('../../..');
|
||||
const {lookupAccountBySid} = srf.locals.dbHelpers;
|
||||
const app = req.body.app;
|
||||
const account = await lookupAccountBySid(app.accountSid);
|
||||
const hook = app.messaging_hook;
|
||||
const requestor = new Requestor(logger, hook);
|
||||
const requestor = new Requestor(logger, account.account_sid, hook, account.webhook_secret);
|
||||
const payload = {
|
||||
provider: req.params.partner,
|
||||
carrier: req.params.partner,
|
||||
messageSid: app.messageSid,
|
||||
accountSid: app.accountSid,
|
||||
applicationSid: app.applicationSid,
|
||||
@@ -38,7 +41,7 @@ router.post('/:partner', async(req, res) => {
|
||||
}
|
||||
|
||||
|
||||
// process any versb in response
|
||||
// process any verbs in response
|
||||
if (Array.isArray(tasks) && tasks.length) {
|
||||
const {srf} = req.app.locals;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user