chore: Add activity message for conversation resolutions by Captain (#11492)

Currently, when Captain resolves a conversation, the same activity
message used for auto-resolution is shown. This has caused confusion for
users.
With this change, a distinct activity message will be displayed
specifically for resolutions performed by Captain, improving clarity.


Fixes
https://linear.app/chatwoot/issue/CW-4289/incorrect-activity-message-for-conversations-resolved-by-captain-auto#comment-d2991763

Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2025-05-16 11:57:07 -07:00
committed by GitHub
parent 107ad99b7e
commit eba24ce275
4 changed files with 37 additions and 8 deletions

View File

@@ -80,6 +80,8 @@ module ActivityMessageHandler
def automation_status_change_activity_content
if Current.executed_by.instance_of?(AutomationRule)
I18n.t("conversations.activity.status.#{status}", user_name: I18n.t('automation.system_name'))
elsif Current.executed_by.instance_of?(Captain::Assistant) && resolved?
I18n.t('conversations.activity.captain.resolved', user_name: Current.executed_by.name)
elsif Current.executed_by.instance_of?(Contact)
Current.executed_by = nil
I18n.t('conversations.activity.status.system_auto_open')