5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 08:06:23 +00:00
panel/app/controllers/moderation_queue_controller.rb

25 lines
853 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Cola de moderación de ActivityPub
class ModerationQueueController < ApplicationController
# Cola de moderación viendo todo el sitio
def index
@moderation_queue = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'moderation_queue.yaml')))
@remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml')))
@moderation_queue.each do |activity|
activity['attributedTo'] = @remote_profile
end
end
# Perfil remoto de usuarie
def remote_profile
@remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml')))
end
# todon.nl está usando /api/v2/instance
# mauve.moe usa /api/v1/instance
def instances
@instances = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'instances.yaml')))
end
end