Restructure omni services and add Chatwoot research snapshot

This commit is contained in:
Ruslan Bakiev
2026-02-21 11:11:27 +07:00
parent edea7a0034
commit b73babbbf6
7732 changed files with 978203 additions and 32 deletions

View File

@@ -0,0 +1,17 @@
class Webhooks::TwilioEventsJob < ApplicationJob
queue_as :low
def perform(params = {})
# Skip processing if Body parameter, MediaUrl0, or location data is not present
# This is to skip processing delivery events being delivered to this endpoint
return if params[:Body].blank? && params[:MediaUrl0].blank? && !valid_location_message?(params)
::Twilio::IncomingMessageService.new(params: params).perform
end
private
def valid_location_message?(params)
params[:MessageType] == 'location' && params[:Latitude].present? && params[:Longitude].present?
end
end