[Feature] Email collect message hooks (#331)

- Add email collect hook on creating conversation
- Merge contact if it already exist
This commit is contained in:
Sojan Jose
2020-01-09 13:06:40 +05:30
committed by Pranav Raj S
parent 59d4eaeca7
commit 722f540b03
68 changed files with 1111 additions and 544 deletions

View File

@@ -5,9 +5,13 @@ FactoryBot.define do
content { 'Message' }
status { 'sent' }
message_type { 'incoming' }
account
inbox
conversation
user
content_type { 'text' }
account { create(:account) }
after(:build) do |message|
message.user ||= create(:user, account: message.account)
message.conversation ||= create(:conversation, account: message.account)
message.inbox ||= create(:inbox, account: message.account)
end
end
end