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:
parent
b119d9e729
commit
d78cb67a2a
13 changed files with 219 additions and 136 deletions
|
@ -64,7 +64,10 @@ RSpec.describe 'Conversation Assignment API', type: :request do
|
|||
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(conversation.reload.assignee).to eq(nil)
|
||||
expect(conversation.messages.last.content).to eq("Conversation unassigned by #{agent.name}")
|
||||
expect(Conversations::ActivityMessageJob)
|
||||
.to(have_been_enqueued.at_least(:once)
|
||||
.with(conversation, { account_id: conversation.account_id, inbox_id: conversation.inbox_id, message_type: :activity,
|
||||
content: "Conversation unassigned by #{agent.name}" }))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue