# frozen_string_literal: true # Gestiona acciones de moderaciĆ³n class ActivityPubsController < ApplicationController include ModerationConcern ActivityPub.events.each do |event| define_method(event) do authorize activity_pub activity_pub.public_send(:"#{event}!") if activity_pub.public_send(:"may_#{event}?") redirect_to_moderation_queue! end end def action_on_several redirect_to_moderation_queue! end private def activity_pub @activity_pub ||= site.activity_pubs.find(params[:activity_pub_id]) end end