Feature: Support file type messages on widget and dashboard (#659)

- Adds support for file upload

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Nithin David Thomas
2020-04-02 12:28:38 +05:30
committed by GitHub
parent 0afa5c297f
commit 7fcd2d0e85
28 changed files with 338 additions and 69 deletions

View File

@@ -0,0 +1,10 @@
json.id @message.id
json.content @message.content
json.inbox_id @message.inbox_id
json.conversation_id @message.conversation.display_id
json.message_type @message.message_type_before_type_cast
json.created_at @message.created_at.to_i
json.private @message.private
json.source_id @message.source_id
json.attachment @message.attachment.push_event_data if @message.attachment
json.sender @message.user.push_event_data if @message.user

View File

@@ -5,7 +5,7 @@ json.array! @messages do |message|
json.content_type message.content_type
json.content_attributes message.content_attributes
json.created_at message.created_at.to_i
json.conversation_id message. conversation_id
json.conversation_id message.conversation.display_id
json.attachment message.attachment.push_event_data if message.attachment
json.sender message.user.push_event_data if message.user
end