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

@@ -117,7 +117,8 @@ class Messages::MessageBuilder
inbox_id: conversation.inbox_id,
message_type: @message_type,
content: response.content,
source_id: response.identifier
source_id: response.identifier,
sender: contact
}
end

View File

@@ -37,7 +37,7 @@ class Messages::Outgoing::NormalBuilder
message_type: :outgoing,
content: @content,
private: @private,
user_id: @user&.id,
sender: @user,
source_id: @fb_id,
content_type: @content_type,
items: @items