chore: Fix conversation status in webhooks (#3364)

- fix the wrong conversation status being sent in webhooks
- additional information in websocket events
- refactor activity messaging code
- move activity message generation to background job to stop the callback loop
This commit is contained in:
Sojan Jose
2021-11-12 16:17:59 +05:30
committed by GitHub
parent b119d9e729
commit d78cb67a2a
13 changed files with 219 additions and 136 deletions

View File

@@ -97,7 +97,8 @@ class Message < ApplicationRecord
data = attributes.merge(
created_at: created_at.to_i,
message_type: message_type_before_type_cast,
conversation_id: conversation.display_id
conversation_id: conversation.display_id,
conversation: { assignee_id: conversation.assignee_id }
)
data.merge!(echo_id: echo_id) if echo_id.present?
data.merge!(attachments: attachments.map(&:push_event_data)) if attachments.present?