From 329d8aff30bf21e59e2c2ddcbc0e5a51bc8ef70d Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Thu, 19 Mar 2020 22:53:17 +0530 Subject: [PATCH] FIX: use the new duration attribute in `set_or_create_timer` method. https://github.com/discourse/discourse/commit/aad12822b7d7c9c6ecd976e23d3a83626c052dce --- plugin.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.rb b/plugin.rb index 26c2378..3efd9af 100644 --- a/plugin.rb +++ b/plugin.rb @@ -125,8 +125,9 @@ SQL if (auto_close_hours > 0) && !topic.closed topic_timer = topic.set_or_create_timer( TopicTimer.types[:close], - auto_close_hours, - based_on_last_post: true + nil, + based_on_last_post: true, + duration: auto_close_hours ) topic.custom_fields[