mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-04 04:57:51 +00:00 
			
		
		
		
	- Twilio events were being processed synchronously, leading to slow API responses. - This change moves Twilio event processing to a background job to improve performance and align with how other events (e.g., WhatsApp) are handled. --------- Co-authored-by: Pranav <pranav@chatwoot.com>
		
			
				
	
	
		
			22 lines
		
	
	
		
			398 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			398 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
class Twilio::DeliveryStatusController < ApplicationController
 | 
						|
  def create
 | 
						|
    Webhooks::TwilioDeliveryStatusJob.perform_later(permitted_params.to_unsafe_hash)
 | 
						|
 | 
						|
    head :no_content
 | 
						|
  end
 | 
						|
 | 
						|
  private
 | 
						|
 | 
						|
  def permitted_params
 | 
						|
    params.permit(
 | 
						|
      :AccountSid,
 | 
						|
      :From,
 | 
						|
      :MessageSid,
 | 
						|
      :MessagingServiceSid,
 | 
						|
      :MessageStatus,
 | 
						|
      :ErrorCode,
 | 
						|
      :ErrorMessage
 | 
						|
    )
 | 
						|
  end
 | 
						|
end
 |