mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
If an auto-closing topic is manually closed, remove the auto-close countdown
This commit is contained in:
@ -138,7 +138,7 @@ class Topic < ActiveRecord::Base
|
||||
|
||||
before_save do
|
||||
if (auto_close_at_changed? and !auto_close_at_was.nil?) or (auto_close_user_id_changed? and auto_close_at)
|
||||
self.auto_close_started_at ||= Time.zone.now
|
||||
self.auto_close_started_at ||= Time.zone.now if auto_close_at
|
||||
Jobs.cancel_scheduled_job(:close_topic, {topic_id: id})
|
||||
true
|
||||
end
|
||||
|
Reference in New Issue
Block a user