Chore: Convert Message Sender to polymorphic (#740)

Fixes #680
This commit is contained in:
Sojan Jose
2020-06-27 21:34:53 +05:30
committed by GitHub
parent 4f83d5451e
commit cc02611007
27 changed files with 71 additions and 49 deletions

View File

@@ -51,7 +51,8 @@ class Integrations::Widget::IncomingMessageBuilder
account_id: conversation.account_id,
inbox_id: conversation.inbox_id,
message_type: 0,
content: options[:content]
content: options[:content],
sender: contact
}
end
end

View File

@@ -46,7 +46,7 @@ class Integrations::Widget::OutgoingMessageBuilder
inbox_id: @conversation.inbox_id,
message_type: 1,
content: options[:content],
user_id: user.id
sender: user
}
end
end