class Decidim::Meetings::MeetingType

def self.authorized?(object, context)

def self.authorized?(object, context)
  context[:meeting] = object
  chain = [
    allowed_to?(:read, :meeting, object, context),
    object.published?,
    object.current_user_can_visit_meeting?(context[:current_user])
  ].all?
  super && chain
end

def agenda

def agenda
  object.agenda if object.agenda&.visible?
end

def audio_url

def audio_url
  object.audio_url if object.closing_visible?
end

def closing_report

def closing_report
  object.closing_report if object.closing_visible?
end

def coordinates

def coordinates
  [object.latitude, object.longitude]
end

def registration_form

def registration_form
  object.questionnaire if object.registration_form_enabled?
end

def video_url

def video_url
  object.video_url if object.closing_visible?
end