iachat/spec/jobs/webhooks
Victor Eduardo cbc2807296
fix: Creates contact when Instagram returns No matching Instagram user (#11496)
# Creates contact when Instagram returns `No matching Instagram user`

## Description

The error occurs when Facebook tries to validate the Facebook App
created to authorize Instagram integration.
The Facebook's agent uses a Bot to make tests on the App where is not a
valid user via API, returning `{"error"=>{"message"=>"No matching
Instagram user", "type"=>"IGApiException", "code"=>9010}}`.
Then Facebook rejects the request saying this app is still not ready
once the integration with Instagram didn't work.
We can safely create an unknown contact, making this integration work.

## Type of change

Please delete options that are not relevant.

- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

There's automated test to cover.

## Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my code
- [X] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my
feature works
- [X] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-07-28 13:49:13 +04:00
..
facebook_delivery_job_spec.rb feat: Facebook delivery reports (#8136) 2023-11-20 12:22:45 +05:30
facebook_events_job_spec.rb feat: implement mutex for SlackSendJob (#7783) 2023-08-25 11:58:29 +07:00
instagram_events_job_spec.rb fix: Creates contact when Instagram returns No matching Instagram user (#11496) 2025-07-28 13:49:13 +04:00
line_events_job_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
sms_events_job_spec.rb feat: Bandwidth sms channel delivery reports (#8198) 2023-10-27 14:07:15 -07:00
telegram_events_job_spec.rb chore: Add warning logs when Chatwoot receives events for inactive channels (#11066) 2025-03-12 08:16:47 -07:00
twilio_delivery_status_job_spec.rb chore: Move Twilio event processing to background job (#11094) 2025-03-15 13:51:08 -07:00
twilio_events_job_spec.rb fix: Support location messages in Twilio WhatsApp integration (#11830) 2025-06-30 11:35:32 +05:30
whatsapp_events_job_spec.rb chore: Logger for non-existent WhatsApp channels (#11064) 2025-03-12 15:50:38 -07:00