This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/jobs/regular/close_topic.rb

13 lines
239 B
Ruby

module Jobs
class CloseTopic < Jobs::Base
def execute(args)
if topic = Topic.where(id: args[:topic_id]).first
closer = User.where(id: args[:user_id]).first
topic.auto_close(closer)
end
end
end
end