mirror of
https://github.com/discourse/discourse.git
synced 2025-07-02 00:52:02 +08:00
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:
@ -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