Class: InstagramConnect::Ingest
- Inherits:
-
Object
- Object
- InstagramConnect::Ingest
- Defined in:
- lib/instagram_connect/ingest.rb,
lib/instagram_connect/ingest/summary.rb,
lib/instagram_connect/ingest/envelope.rb,
lib/instagram_connect/ingest/registry.rb,
lib/instagram_connect/ingest/dispatcher.rb,
lib/instagram_connect/ingest/handlers/base.rb,
lib/instagram_connect/ingest/handlers/unknown.rb,
lib/instagram_connect/ingest/handlers/comments.rb,
lib/instagram_connect/ingest/handlers/mentions.rb,
lib/instagram_connect/ingest/handlers/messages.rb,
lib/instagram_connect/ingest/handlers/messaging_seen.rb,
lib/instagram_connect/ingest/handlers/story_insights.rb,
lib/instagram_connect/ingest/handlers/messaging_optins.rb,
lib/instagram_connect/ingest/handlers/message_reactions.rb,
lib/instagram_connect/ingest/handlers/messaging_handover.rb,
lib/instagram_connect/ingest/handlers/messaging_referral.rb,
lib/instagram_connect/ingest/handlers/messaging_postbacks.rb
Overview
Turns a verified Meta webhook payload into persisted rows, and fires the configured host callbacks (on_message / on_comment / on_postback) so the host can layer notifications, AI drafting or CRM linking on top.
Every event is banked on InstagramConnect::WebhookEvent before anything parses it. That is what makes an unparsed or mis-parsed event recoverable: Meta neither stores nor re-delivers webhooks, so anything dropped here is gone permanently. See Ingest::Dispatcher for the walk.
Returns a Summary, which reads like the plain hash 0.2.x returned.
Defined Under Namespace
Modules: Handlers, Registry Classes: Dispatcher, Envelope, Summary
Class Method Summary collapse
Class Method Details
.call(payload:, config: InstagramConnect.configuration) ⇒ Object
13 14 15 |
# File 'lib/instagram_connect/ingest.rb', line 13 def self.call(payload:, config: InstagramConnect.configuration) Dispatcher.new(config).call(payload) end |