FIX: Do not delete old chat messages if chat disabled (#21214)

Further followup to 24ec06ff85c7acbad9621092b5e50eec2ede7b83,
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:
Martin Brennan
2023-04-24 14:42:50 +10:00
committed by GitHub
parent 7464634f69
commit 896707c7ea
2 changed files with 24 additions and 1 deletions

View File

@ -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