iachat/app/models/concerns
Muhsin Keloth b5ebc47637
fix: Send CSAT survey only when agent can reply in conversation (#11584)
Fixes https://github.com/chatwoot/chatwoot/issues/11569

 ## Problem
On platforms like WhatsApp and Facebook Messenger, customers cannot
reply to messages after 24 hours (or other channel-specific messaging
windows). Despite this limitation, the system continued sending CSAT
surveys to customers outside their messaging window, making it
impossible for them to respond.

  ## Solution
Added a check for `conversation.can_reply?` in the
`should_send_csat_survey?` method. This leverages the existing
`MessageWindowService` which already handles all channel-specific
messaging window logic.
2025-05-28 19:34:11 +05:30
..
.keep Initial Commit 2019-08-14 15:18:44 +05:30
access_tokenable.rb Chore: Replaced dependent destroy with dependent destroy_async in all models (#3249) 2021-11-18 10:32:29 +05:30
account_cache_revalidator.rb feat: expiry for cache keys [CW-3038] (#8793) 2024-01-29 15:27:26 +05:30
activity_message_handler.rb fix: Send CSAT survey only when agent can reply in conversation (#11584) 2025-05-28 19:34:11 +05:30
assignment_handler.rb feat: Add support for multi-language support for Captain (#11068) 2025-03-19 18:25:33 -07:00
auto_assignment_handler.rb fix: assignee_changed callback not getting triggered during conversation creation (#9334) 2024-05-06 11:48:17 -07:00
availability_statusable.rb chore: Move agent availability to Account level (#3074) 2021-10-07 13:21:46 +05:30
avatarable.rb chore: Upgrade to Rails 7 (#6719) 2023-05-06 10:44:52 +05:30
cache_keys.rb feat: expiry for cache keys [CW-3038] (#8793) 2024-01-29 15:27:26 +05:30
channelable.rb chore: Centralize outgoing message reply restrictions for all the channels (#11279) 2025-04-12 08:52:12 +05:30
content_attribute_validator.rb chore: Upgrade rails and ruby versions (#2400) 2021-08-03 20:11:52 +05:30
conversation_mute_helpers.rb feat: Ability to block contacts permanently (#8922) 2024-02-21 14:18:42 -08:00
csat_activity_message_handler.rb fix: Send CSAT survey only when agent can reply in conversation (#11584) 2025-05-28 19:34:11 +05:30
featurable.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
json_schema_validator.rb feat: Add support for minutes in auto resolve feature (#11269) 2025-05-07 00:36:15 -07:00
label_activity_message_handler.rb feat: add activity message for SLA (#9100) 2024-03-13 20:05:34 +05:30
labelable.rb fix: Label Duplication in Bulk Actions (#7341) 2023-06-22 18:36:58 +05:30
liquidable.rb refactor: remove redundant taggable declaration (#7310) 2023-06-15 12:57:56 +05:30
llm_formattable.rb chore: Update LLM formatter classes to include additional details (#11491) 2025-05-15 17:47:37 -07:00
message_filter_helpers.rb feat: Enable sending template messages in webhooks (#7252) 2023-06-05 20:27:28 +05:30
out_of_offisable.rb Fix: add option to choose 24 hour working slot (#4018) 2022-02-22 01:28:49 -08:00
priority_activity_message_handler.rb chore(i18n): Improvements in automation and macros (#11231) 2025-04-02 15:48:42 -07:00
pubsubable.rb chore: Rotate pubsub token on password change (#7194) 2023-05-27 13:24:31 +05:30
push_data_helper.rb feat: UI to show the SLA threshold in chat screen (#9146) 2024-04-04 15:46:46 +05:30
reauthorizable.rb feat: Instagram reauthorization (#11221) 2025-04-03 14:30:48 +05:30
reportable.rb Chore: clean up Reporting Events (#4044) 2022-02-28 18:16:12 +05:30
sla_activity_message_handler.rb feat: add activity message for SLA (#9100) 2024-03-13 20:05:34 +05:30
sort_handler.rb feat: Add support for ascending and descending options in sort (#8542) 2023-12-12 17:15:48 -08:00
sso_authenticatable.rb feat: Prevent saving preferences and status when impersonating (#11164) 2025-05-20 17:34:30 -07:00
team_activity_message_handler.rb feat: add activity message for SLA (#9100) 2024-03-13 20:05:34 +05:30
user_attribute_helpers.rb chore: Add controllers for conversation participants (#6462) 2023-02-15 16:33:31 -08:00