-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
per org messaging service #175
per org messaging service #175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of message services are Twilio-specific. Given that we are still considering moving entirely from Twilio to Nexmo, I think we want to save ourselves the hypothetical work down the line and figure out how to write this in a Twilio-specific way now.
src/workers/jobs.js
Outdated
@@ -232,6 +232,11 @@ export async function uploadContacts(job) { | |||
|
|||
try { | |||
await trx("campaign_contact").insert(chunk); | |||
await ensureAllNumbersHaveMessagingServiceSIDs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this an optional message service function:
import serviceMap from "../server/api/lib/services";
...
try {
await trx("campaign_contact").insert(chunk);
const service = serviceMap[process.env.DEFAULT_SERVICE];
if (service.ensureAllNumbersHaveMessagingServiceSIDs)
await service.ensureAllNumbersHaveMessagingServiceSIDs(
src/workers/jobs.js
Outdated
})) | ||
); | ||
|
||
cellsUsedForMakingUpGap = cellsUsedForMakingUpGap.concat(gap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's adding a number
to a list of cell phone numbers (string[]
)?
Co-Authored-By: Benjamin Chrobot <[email protected]>
Co-Authored-By: Benjamin Chrobot <[email protected]>
Co-Authored-By: Benjamin Chrobot <[email protected]>
Co-Authored-By: Benjamin Chrobot <[email protected]>
Co-Authored-By: Benjamin Chrobot <[email protected]>
Co-Authored-By: Benjamin Chrobot <[email protected]>
Co-Authored-By: Benjamin Chrobot <[email protected]>
No description provided.