Revert "FIX: Topic Timer auto opening closed topics (#10524)"

This reverts commit 7cfd5f87ff16d3010274851b7442aa92c2d494d6.
This commit is contained in:
Guo Xiang Tan
2020-08-26 09:32:11 +08:00
parent 7cfd5f87ff
commit ffc5bb7278
4 changed files with 41 additions and 36 deletions

View File

@ -127,6 +127,7 @@ class TopicTimer < ActiveRecord::Base
def schedule_auto_open_job(time)
return unless topic
topic.update_status('closed', true, user) if !topic.closed
Jobs.enqueue_at(time, :toggle_topic_closed,
topic_timer_id: id,
@ -136,6 +137,7 @@ class TopicTimer < ActiveRecord::Base
def schedule_auto_close_job(time)
return unless topic
topic.update_status('closed', false, user) if topic.closed
Jobs.enqueue_at(time, :toggle_topic_closed,
topic_timer_id: id,