feat: Handle instagram test service (#11244)

This PR will handle the Instagram test events. We are using the last
created Instagram channel as the test channel since we don't have any
other channels for testing purposes at the time of Meta approval.



https://github.com/user-attachments/assets/98302b7a-d72c-4950-9660-861a5e08d55f

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
Muhsin Keloth
2025-04-11 19:11:29 +05:30
committed by GitHub
parent 50344a282b
commit bdcb080e40
4 changed files with 199 additions and 0 deletions

View File

@@ -361,4 +361,34 @@ FactoryBot.define do
end
initialize_with { attributes }
end
factory :instagram_test_event, class: Hash do
entry do
[
{
'id': '0',
'time': '2021-09-08T06:34:04+0000',
'changes': [
{
'field': 'messages',
'value': {
'sender': {
'id': '12334'
},
'recipient': {
'id': '23245'
},
'timestamp': '1527459824',
'message': {
'mid': 'random_mid',
'text': 'random_text'
}
}
}
]
}
]
end
initialize_with { attributes }
end
end