FIX: Only show admin dashboard errors when plugin/provider enabled (#117)
This commit is contained in:
parent
0c367e19ca
commit
8de3e498b2
|
@ -29,9 +29,13 @@ after_initialize do
|
||||||
add_admin_route 'chat_integration.menu_title', 'chat-integration'
|
add_admin_route 'chat_integration.menu_title', 'chat-integration'
|
||||||
|
|
||||||
AdminDashboardData.add_problem_check do
|
AdminDashboardData.add_problem_check do
|
||||||
|
break if !SiteSetting.chat_integration_enabled
|
||||||
|
|
||||||
error = false
|
error = false
|
||||||
DiscourseChatIntegration::Channel.find_each do |channel|
|
DiscourseChatIntegration::Channel.find_each do |channel|
|
||||||
error = true unless channel.error_key.blank?
|
next if channel.error_key.blank?
|
||||||
|
next if !::DiscourseChatIntegration::Provider.is_enabled(channel.provider)
|
||||||
|
error = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if error
|
if error
|
||||||
|
|
Loading…
Reference in New Issue