class Decidim::Meetings::Admin::UnpublishMeeting

existing meeting.
A command with all the business logic that unpublishes an

def call

Returns nothing.

- :invalid if the form was not valid and we could not proceed.
- :ok when everything is valid.

Executes the command. Broadcasts these events:
def call
  return broadcast(:invalid) unless meeting.published?
  @meeting = Decidim.traceability.perform_action!(
    :unpublish,
    meeting,
    current_user,
    visibility: "all"
  ) do
    meeting.unpublish!
    meeting
  end
  broadcast(:ok, meeting)
end

def initialize(meeting, current_user)

current_user - the user performing the action
meeting - Decidim::Meetings::Meeting

Public: Initializes the command.
def initialize(meeting, current_user)
  @meeting = meeting
  @current_user = current_user
end