chore: Refactor Contact Inbox Builders (#5617)
- Remove duplicate code and move everything to builders - fixes: #4680
This commit is contained in:
@@ -46,8 +46,13 @@ unless Rails.env.production?
|
||||
inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support')
|
||||
InboxMember.create!(user: user, inbox: inbox)
|
||||
|
||||
contact = Contact.create!(name: 'jane', email: 'jane@example.com', phone_number: '+2320000', account: account)
|
||||
contact_inbox = ContactInbox.create!(inbox: inbox, contact: contact, source_id: user.id, hmac_verified: true)
|
||||
contact = ::ContactInboxWithContactBuilder.new(
|
||||
source_id: user.id,
|
||||
inbox: inbox,
|
||||
hmac_verified: true,
|
||||
contact_attributes: { name: 'jane', email: 'jane@example.com', phone_number: '+2320000' }
|
||||
).perform&.contact
|
||||
|
||||
conversation = Conversation.create!(
|
||||
account: account,
|
||||
inbox: inbox,
|
||||
|
||||
Reference in New Issue
Block a user