akkounts/app/controllers/services/mastodon_controller.rb
2023-08-11 13:58:53 +02:00

15 lines
352 B
Ruby

class Services::MastodonController < Services::BaseController
before_action :authenticate_user!
before_action :require_service_available
def show
@service_enabled = current_user.services_enabled.include?(:mastodon)
end
private
def require_service_available
http_status :not_found unless Setting.ejabberd_enabled?
end
end