From 25c9963284887f581758d2f524e9b81ab9ed4991 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 28 Feb 2024 18:35:34 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20mostrar=20las=20cuentas=20en=20la=20col?= =?UTF-8?q?a=20de=20moderaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/moderation_queue_controller.rb | 1 + app/processors/actor_moderation_processor.rb | 4 ++-- app/views/moderation_queue/_accounts.haml | 4 ++-- app/views/moderation_queue/index.haml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/moderation_queue_controller.rb b/app/controllers/moderation_queue_controller.rb index fd7d2acb..a9611a1b 100644 --- a/app/controllers/moderation_queue_controller.rb +++ b/app/controllers/moderation_queue_controller.rb @@ -11,6 +11,7 @@ class ModerationQueueController < ApplicationController # @todo cambiar el estado por query @activity_pubs = site.activity_pubs @instance_moderations = rubanok_process(site.instance_moderations, with: InstanceModerationProcessor) + @actor_moderations = rubanok_process(site.actor_moderations, with: ActorModerationProcessor) end # Perfil remoto de usuarie diff --git a/app/processors/actor_moderation_processor.rb b/app/processors/actor_moderation_processor.rb index efd12666..a3035654 100644 --- a/app/processors/actor_moderation_processor.rb +++ b/app/processors/actor_moderation_processor.rb @@ -7,7 +7,7 @@ class ActorModerationProcessor < Rubanok::Processor raw.order(updated_at: :desc) end - map :actor_state, activate_always: true do |state: 'paused'| - raw.where(aasm_state: state) + map :actor_state, activate_always: true do |actor_state: 'paused'| + raw.where(aasm_state: actor_state) end end diff --git a/app/views/moderation_queue/_accounts.haml b/app/views/moderation_queue/_accounts.haml index c88a2de6..5630a6d7 100644 --- a/app/views/moderation_queue/_accounts.haml +++ b/app/views/moderation_queue/_accounts.haml @@ -5,6 +5,6 @@ -# Filtros = render 'components/profiles_filters' .col-12 - - @moderation_queue.map{ |c| c['attributedTo'] }.uniq.each do |remote_profile| + - actor_moderations.find_each do |actor_moderation| %hr - = render 'account', profile: remote_profile + = render 'account', actor_moderation: actor_moderation, profile: actor_moderation.actor.content diff --git a/app/views/moderation_queue/index.haml b/app/views/moderation_queue/index.haml index 0fb1c968..df2c219d 100644 --- a/app/views/moderation_queue/index.haml +++ b/app/views/moderation_queue/index.haml @@ -9,7 +9,7 @@ %hr - summary = t('.accounts') = render 'layouts/details', summary: summary do - = render 'moderation_queue/accounts', site: @site, post: @post, moderation_queue: @moderation_queue + = render 'moderation_queue/accounts', site: @site, post: @post, actor_moderations: @actor_moderations %hr - summary = t('.comments') = render 'layouts/details', summary: summary do