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

@ -463,15 +463,6 @@ class TopicsController < ApplicationController
options.merge!(category_id: params[:category_id]) if !params[:category_id].blank?
options.merge!(duration: params[:duration].to_i) if params[:duration].present?
# Be sure to close/open the topic when setting an auto-open/auto-close timer
if status_type == TopicTimer.types[:open]
topic.update_status('closed', true, current_user) if !topic.closed
end
if status_type == TopicTimer.types[:close]
topic.update_status('closed', false, current_user) if topic.closed
end
topic_status_update = topic.set_or_create_timer(
status_type,
params[:time],