fix: Update the message status to failed if the outgoing Facebook message fails. (#8258)

This commit is contained in:
Muhsin Keloth
2023-11-01 06:10:17 +05:30
committed by GitHub
parent d876419b27
commit 68b8d721a7
2 changed files with 3 additions and 0 deletions

View File

@@ -58,6 +58,8 @@ describe Facebook::SendOnFacebookService do
described_class.new(message: message).perform
expect(facebook_channel.authorization_error_count).to eq(1)
expect(message.reload.status).to eq('failed')
expect(message.reload.external_error).to eq('Error validating access token')
end
it 'if message with attachment is sent from chatwoot and is outgoing' do