fix: db/seeds.rb field contact_inbox is undefined (#5743)

fixes rails db:chatwoot_prepare error: field contact_inbox is undefined
This commit is contained in:
givetimetolife 2022-11-01 15:52:07 +08:00 committed by GitHub
parent 92724576af
commit f8d9a27d7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,19 +46,19 @@ unless Rails.env.production?
inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support') inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support')
InboxMember.create!(user: user, inbox: inbox) InboxMember.create!(user: user, inbox: inbox)
contact = ::ContactInboxWithContactBuilder.new( contact_inbox = ::ContactInboxWithContactBuilder.new(
source_id: user.id, source_id: user.id,
inbox: inbox, inbox: inbox,
hmac_verified: true, hmac_verified: true,
contact_attributes: { name: 'jane', email: 'jane@example.com', phone_number: '+2320000' } contact_attributes: { name: 'jane', email: 'jane@example.com', phone_number: '+2320000' }
).perform&.contact ).perform
conversation = Conversation.create!( conversation = Conversation.create!(
account: account, account: account,
inbox: inbox, inbox: inbox,
status: :open, status: :open,
assignee: user, assignee: user,
contact: contact, contact: contact_inbox.contact,
contact_inbox: contact_inbox, contact_inbox: contact_inbox,
additional_attributes: {} additional_attributes: {}
) )