feat: handle unsupported media on the backend (#8650)

This PR logs additional information in content_attributes of a message in case it is unsupported. This info can be used by the client to render a fresh UI
This commit is contained in:
Shivam Mishra
2024-01-06 02:35:00 +05:30
committed by GitHub
parent 68062216e4
commit 6e30064421
4 changed files with 54 additions and 2 deletions

View File

@@ -273,6 +273,33 @@ FactoryBot.define do
initialize_with { attributes }
end
factory :instagram_message_unsupported_event, class: Hash do
entry do
[
{
'id': 'instagram-message-unsupported-id-123',
'time': '2021-09-08T06:34:04+0000',
'messaging': [
{
'sender': {
'id': 'Sender-id-1'
},
'recipient': {
'id': 'chatwoot-app-user-id-1'
},
'timestamp': '2021-09-08T06:34:04+0000',
'message': {
'mid': 'unsupported-message-id-1',
'is_unsupported': true
}
}
]
}
]
end
initialize_with { attributes }
end
factory :messaging_seen_event, class: Hash do
entry do
[