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:
@@ -3,6 +3,7 @@ class Captain::InboxPendingConversationsResolutionJob < ApplicationJob
|
||||
|
||||
def perform(inbox)
|
||||
# limiting the number of conversations to be resolved to avoid any performance issues
|
||||
Current.executed_by = inbox.captain_assistant
|
||||
resolvable_conversations = inbox.conversations.pending.where('last_activity_at < ? ', Time.now.utc - 1.hour).limit(Limits::BULK_ACTIONS_LIMIT)
|
||||
resolvable_conversations.each do |conversation|
|
||||
resolution_message = conversation.inbox.captain_assistant.config['resolution_message']
|
||||
@@ -15,6 +16,8 @@ class Captain::InboxPendingConversationsResolutionJob < ApplicationJob
|
||||
}
|
||||
)
|
||||
conversation.resolved!
|
||||
ensure
|
||||
Current.reset
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user