mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-30 10:42:38 +00:00
fix: Move the check for CaptainAssistant to enterprise (#11500)
This commit is contained in:
@@ -80,8 +80,6 @@ module ActivityMessageHandler
|
|||||||
def automation_status_change_activity_content
|
def automation_status_change_activity_content
|
||||||
if Current.executed_by.instance_of?(AutomationRule)
|
if Current.executed_by.instance_of?(AutomationRule)
|
||||||
I18n.t("conversations.activity.status.#{status}", user_name: I18n.t('automation.system_name'))
|
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)
|
elsif Current.executed_by.instance_of?(Contact)
|
||||||
Current.executed_by = nil
|
Current.executed_by = nil
|
||||||
I18n.t('conversations.activity.status.system_auto_open')
|
I18n.t('conversations.activity.status.system_auto_open')
|
||||||
@@ -128,3 +126,5 @@ module ActivityMessageHandler
|
|||||||
user_name
|
user_name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ActivityMessageHandler.prepend_mod_with('ActivityMessageHandler')
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
module Enterprise::ActivityMessageHandler
|
||||||
|
def automation_status_change_activity_content
|
||||||
|
if Current.executed_by.instance_of?(Captain::Assistant) && resolved?
|
||||||
|
I18n.t('conversations.activity.captain.resolved', user_name: Current.executed_by.name)
|
||||||
|
else
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user