iachat/spec/jobs
Tanmay Deep Sharma d451615811
fix: prevent NoMethodError in mute helpers when contact is nil (#13277)
## Linear Ticket

https://linear.app/chatwoot/issue/CW-4569/nomethoderror-undefined-method-blocked-for-nil-nomethoderror

## Description
Fixes NoMethodError in ConversationMuteHelpers that occurs during
contact deletion race condition.
When a contact is deleted, there's a brief window (~50-150ms) where
contact_id becomes nil but conversations still exist. If ResolutionJob
runs during this window, the muted? method crashes trying to call
blocked? on nil.Fixes # (issue)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

- Created orphaned conversations (contact_id = nil)
- Called muted?, mute!, unmute! - all return gracefully
- Verified async deletion still works correctly

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] 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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules



Co-authored-by: Sojan Jose <sojan@pepalo.com>
2026-01-15 22:00:09 -08:00
..
account feat: Use resolved contacts as base relation for filtering (#12520) 2025-09-25 15:26:44 +05:30
agent_bots feat: Implement UI for Agent Bots in settings and remove CSML support (#11276) 2025-04-16 18:02:49 +05:30
agents chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
auto_assignment feat: Assignment service (v2) (#12320) 2025-11-17 10:08:25 +05:30
avatar fix: Add URL validation and rate limiting for contact avatar sync (#11979) 2025-09-10 20:08:06 +05:30
campaigns chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
channels feat: Added the backend support for twilio content templates (#12272) 2025-08-24 10:05:15 +05:30
contacts feat: Bulk actions for contacts (#12763) 2025-10-30 15:28:28 +05:30
conversations fix: prevent NoMethodError in mute helpers when contact is nil (#13277) 2026-01-15 22:00:09 -08:00
crm feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
inboxes feat: Run assignment every 15 minutes (#12334) 2025-08-29 15:10:56 -07:00
internal feat: automate account deletion (#11406) 2025-05-23 12:58:13 +05:30
labels chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
migration chore: [Snyk] Security upgrade rspec-rails from 6.1.4 to 6.1.5 (#10066) 2024-09-16 09:44:07 +05:30
notification chore: [Snyk] Security upgrade rspec-rails from 6.1.4 to 6.1.5 (#10066) 2024-09-16 09:44:07 +05:30
webhooks feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
bulk_actions_job_spec.rb feat: Add support for bulk snooze until (#9360) 2024-05-08 08:55:31 +05:30
conversation_reply_email_job_spec.rb chore(sidekiq): log ActiveJob class and job_id on dequeue (#12704) 2025-10-22 20:20:37 -07:00
data_import_job_spec.rb fix: stream attachment handling in workers (#12870) 2025-12-05 13:02:53 -08:00
delete_object_job_spec.rb feat: speed up circleci and github actions (#12849) 2025-11-19 15:32:48 +05:30
event_dispatcher_job_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
hook_job_spec.rb feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
mutex_application_job_spec.rb feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
send_on_slack_job_spec.rb fix: issue with slack job (#7179) 2023-05-24 20:22:34 +05:30
send_reply_job_spec.rb feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
slack_unfurl_job_spec.rb feat: Support link unfurling for all the channels within the same connected channel account. (#8033) 2023-10-08 17:55:03 +05:30
trigger_scheduled_items_job_spec.rb chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
webhook_job_spec.rb feat: Mark the messages as failed if the API channel webhooks fail for any reason. (#8277) 2023-11-04 12:26:28 +05:30