mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:20:43 +08:00
16 lines
335 B
Ruby
16 lines
335 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Jobs
|
|
class MakeEmbeddedTopicVisible < ::Jobs::Base
|
|
|
|
def execute(args)
|
|
raise Discourse::InvalidParameters.new(:topic_id) if args[:topic_id].blank?
|
|
|
|
if topic = Topic.find_by(id: args[:topic_id])
|
|
topic.update_status('visible', true, topic.user)
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|