Open matalaweb opened 2 months ago
Hi @matalaweb , are you planning to implement inbound messaging also or only outbound?
My apologies, I do intend to implement inbound. I will create a new PR when implemented.
No worries; let's keep using this same branch & PR. Comment when you've got the inbound messaging done and ready for review.
I'm struggling to find the inbound message handling method. Could you provide some guidance as to where I should be looking? I apologize, this is my first time touching a fbpx module.
@matalaweb Sorry I missed your question last week. Take a look at any of the other provider-*.php
files. You implement the callPublic($connector)
function such that it receives the webhook sent by the provider (in whatever format they send, usually JSON), use the $connector->getMessage
function to ingest it into the SMS system, and if it's a MMS, use the $connector->addMedia
function to ingest the media attachments. When done, call $connector->emitSmsInboundUserEvt(...)
to signal that a new SMS has been received and respond to the provider with the appropriate code (usually 200 or 202).
Adding BRCK (brck.com) as a provider.