chore: Refactor Contact Inbox Builders (#5617)
- Remove duplicate code and move everything to builders - fixes: #4680
This commit is contained in:
@@ -48,7 +48,7 @@ class Whatsapp::IncomingMessageBaseService
|
||||
contact_params = @processed_params[:contacts]&.first
|
||||
return if contact_params.blank?
|
||||
|
||||
contact_inbox = ::ContactBuilder.new(
|
||||
contact_inbox = ::ContactInboxWithContactBuilder.new(
|
||||
source_id: contact_params[:wa_id],
|
||||
inbox: inbox,
|
||||
contact_attributes: { name: contact_params.dig(:profile, :name), phone_number: "+#{@processed_params[:messages].first[:from]}" }
|
||||
|
||||
Reference in New Issue
Block a user