2024-01-12 20:37:37 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Cola de moderación de ActivityPub
|
|
|
|
class ModerationQueueController < ApplicationController
|
2024-03-05 19:24:16 +00:00
|
|
|
include ModerationFiltersConcern
|
|
|
|
|
2024-03-14 15:02:37 +00:00
|
|
|
before_action :authenticate_usuarie!
|
|
|
|
|
|
|
|
breadcrumb -> { current_usuarie.email }, :edit_usuarie_registration_path
|
|
|
|
breadcrumb 'sites.index', :sites_path, match: :exact
|
2024-03-14 15:21:50 +00:00
|
|
|
|
2024-01-12 20:37:37 +00:00
|
|
|
# Cola de moderación viendo todo el sitio
|
|
|
|
def index
|
2024-03-21 21:12:12 +00:00
|
|
|
authorize ModerationQueue.new(site)
|
2024-03-16 14:32:16 +00:00
|
|
|
breadcrumb site.title, site_posts_path(site)
|
2024-03-15 15:23:04 +00:00
|
|
|
breadcrumb I18n.t('moderation_queue.index.title'), ''
|
2024-01-12 20:37:37 +00:00
|
|
|
|
2024-03-21 21:12:12 +00:00
|
|
|
site.moderation_checked!
|
|
|
|
|
2024-02-24 16:04:52 +00:00
|
|
|
# @todo cambiar el estado por query
|
2024-02-26 13:39:00 +00:00
|
|
|
@activity_pubs = site.activity_pubs
|
2024-02-26 19:51:33 +00:00
|
|
|
@instance_moderations = rubanok_process(site.instance_moderations, with: InstanceModerationProcessor)
|
2024-02-28 21:35:34 +00:00
|
|
|
@actor_moderations = rubanok_process(site.actor_moderations, with: ActorModerationProcessor)
|
2024-03-04 14:59:29 +00:00
|
|
|
@moderation_queue = rubanok_process(site.activity_pubs, with: ActivityPubProcessor)
|
2024-01-12 20:37:37 +00:00
|
|
|
end
|
|
|
|
end
|