Chore: Add additional_attributes to conversation seed
This commit is contained in:
parent
1273ea64d3
commit
ef6c695bcb
2 changed files with 12 additions and 5 deletions
|
@ -108,10 +108,9 @@ export default {
|
|||
return channel;
|
||||
},
|
||||
conversationType() {
|
||||
const {
|
||||
additional_attributes: additionalAttributes = {},
|
||||
} = this.currentChat;
|
||||
return additionalAttributes.type || '';
|
||||
const { additional_attributes: additionalAttributes } = this.currentChat;
|
||||
const type = additionalAttributes ? additionalAttributes.type : '';
|
||||
return type || '';
|
||||
},
|
||||
maxLength() {
|
||||
if (this.channelType === 'Channel::FacebookPage') {
|
||||
|
|
10
db/seeds.rb
10
db/seeds.rb
|
@ -11,5 +11,13 @@ InboxMember.create!(user: user, inbox: inbox)
|
|||
|
||||
contact = Contact.create!(name: 'jane', email: 'jane@example.com', phone_number: '0000', account: account)
|
||||
contact_inbox = ContactInbox.create!(inbox: inbox, contact: contact, source_id: user.id)
|
||||
conversation = Conversation.create!(account: account, inbox: inbox, status: :open, assignee: user, contact: contact, contact_inbox: contact_inbox)
|
||||
conversation = Conversation.create!(
|
||||
account: account,
|
||||
inbox: inbox,
|
||||
status: :open,
|
||||
assignee: user,
|
||||
contact: contact,
|
||||
contact_inbox: contact_inbox,
|
||||
additional_attributes: {}
|
||||
)
|
||||
Message.create!(content: 'Hello', account: account, inbox: inbox, conversation: conversation, message_type: :incoming)
|
||||
|
|
Loading…
Reference in a new issue