chatwoot/spec/models
Sony Mathew 27f2c2b392
Some checks failed
Frontend Lint & Test / test (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
feat: Unread Count: added api, store refresher, invalidation and events (2/3)[CW-6851] (#14369)
# Pull Request Template

## Description

This is the second PR in a series of PRs for Introducing unread counts
in the sidebar for inboxes and labels.

In this PR:

* added api for unread counts 
* Added the store refresher and invalidation with event listeners
* Added action cable event
* Added specs for the changes

Issue:
https://linear.app/chatwoot/issue/CW-6851/support-unread-conversation-counts

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] 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: Sojan Jose <sojan@pepalo.com>
2026-05-20 17:36:09 +05:30
..
channel test(voice): WhatsApp Cloud Calling specs [5] (#14357) 2026-05-12 12:40:13 +05:30
concerns fix: Skip email rate limiting for self-hosted instances (#13915) 2026-03-26 18:06:10 +05:30
enterprise/audit feat: Add conversation delete feature (#11677) 2025-06-05 15:53:17 -05:00
integrations fix: validate OpenAI hook credentials (#14068) 2026-05-18 14:08:57 +05:30
.keep Fix url in emails, add frontendURL helper (#19) 2019-08-25 19:59:28 +05:30
account_spec.rb feat: Unread Count: added api, store refresher, invalidation and events (2/3)[CW-6851] (#14369) 2026-05-20 17:36:09 +05:30
account_user_spec.rb chore: Add permissions to auth data (#9695) 2024-06-28 12:52:48 -07:00
agent_bot_inbox_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
agent_bot_spec.rb fix(agent-bots): destroy permissibles on AgentBot deletion and skip orphans in index (#14273) 2026-04-27 19:17:32 +05:30
application_record_external_credentials_encryption_spec.rb feat: Secure external credentials with database encryption (#12648) 2025-10-13 18:05:12 +05:30
article_spec.rb chore: allow article to create without content (#14007) 2026-04-09 10:40:37 +05:30
assignment_policy_spec.rb feat: Add assignment policies controllers with jbuilder views (#12199) 2025-08-18 19:15:21 -07:00
attachment_spec.rb fix: scope external_url override to Instagram DM conversations only (#13982) 2026-04-02 19:56:23 +05:30
automation_rule_spec.rb fix: add explicit remove assignment actions to macros and automations (#12172) 2026-04-16 15:57:41 +05:30
campaign_spec.rb chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
category_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
contact_inbox_spec.rb feat: Store WhatsApp BSUID identifiers from inbound webhooks (#14436) 2026-05-20 13:36:43 +04:00
contact_spec.rb fix: [CW-6931] Harden external downloads against SSRF [avatar from url job] (#14153) 2026-04-24 18:59:45 +05:30
conversation_participants_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
conversation_spec.rb feat: Unread Count: added api, store refresher, invalidation and events (2/3)[CW-6851] (#14369) 2026-05-20 17:36:09 +05:30
csat_survey_response_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
custom_attribute_definition_spec.rb feat(companies): add company detail page (#14054) 2026-05-06 20:50:27 +05:30
data_import_spec.rb chore: Add delay before running dataimport job (#8039) 2023-10-03 22:18:57 -07:00
folder_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
inbox_member_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
inbox_spec.rb feat: remove colon and semicolons when sanitizing inbox name (#11889) 2025-07-08 09:41:40 +05:30
installation_config_spec.rb fix: Annotaterb model annotation incomplete migration (#13132) 2026-03-25 17:51:06 -07:00
label_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
macro_spec.rb test: reset Current.user after spec (#8123) 2023-10-17 18:06:54 +05:30
mention_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
message_spec.rb fix: Send raw content in webhook payloads instead of channel-rendered markdown (#13896) 2026-03-25 16:56:22 +04:00
note_spec.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
notification_setting_spec.rb Feature: Add new notification settings for user (#569) 2020-02-29 20:41:09 +05:30
notification_spec.rb feat: speed up circleci and github actions (#12849) 2025-11-19 15:32:48 +05:30
platform_app_permissible_spec.rb feat: Add Platform APIs (#1456) 2021-01-14 20:35:22 +05:30
platform_app_spec.rb chore: Limit objects returned by conversation API (#2721) 2021-07-31 21:19:42 +05:30
portal_spec.rb feat: Add an option on the dashboard to allow switching help center layout (#14491) 2026-05-19 06:42:48 -07:00
related_category_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
reporting_event_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
reporting_events_rollup_spec.rb feat(rollup): add models and write path [1/3] (#13796) 2026-03-19 13:12:36 +05:30
team_member_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
team_spec.rb feat: invalidate cache after inbox members or team members update (#10869) 2025-02-20 21:28:38 -08:00
user_spec.rb fix: linear and user association spec (#13056) 2025-12-12 18:53:26 +05:30
webhook_spec.rb feat: add per-webhook secret with backfill migration (#13573) 2026-02-26 17:26:12 +05:30
working_hour_spec.rb fix: Update timezone to get wday from working_hours (#5605) 2022-10-12 14:32:54 -07:00