mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Do not delete old chat messages if chat disabled (#21214)
Further followup to 24ec06ff85,
where I prevented other chat scheduled jobs from running if
chat was disabled. We should not be running any plugin scheduled
jobs if that plugin is disabled, it can cause unexpected
behaviour.
This commit is contained in:
@@ -6,6 +6,8 @@ module Jobs
|
||||
daily at: 0.hours
|
||||
|
||||
def execute(args = {})
|
||||
return if !SiteSetting.chat_enabled
|
||||
|
||||
delete_public_channel_messages
|
||||
delete_dm_channel_messages
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user