2024-01-12 20:37:37 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Cola de moderación de ActivityPub
|
|
|
|
class ModerationQueueController < ApplicationController
|
|
|
|
# Cola de moderación viendo todo el sitio
|
|
|
|
def index
|
2024-01-12 20:55:15 +00:00
|
|
|
@moderation_queue = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'moderation_queue.yaml')))
|
2024-01-29 19:35:53 +00:00
|
|
|
@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
|
2024-01-12 20:37:37 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Perfil remoto de usuarie
|
|
|
|
def remote_profile
|
2024-01-12 20:55:15 +00:00
|
|
|
@remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml')))
|
2024-01-12 20:37:37 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# todon.nl está usando /api/v2/instance
|
|
|
|
# mauve.moe usa /api/v1/instance
|
|
|
|
def instances
|
2024-01-12 20:55:15 +00:00
|
|
|
@instances = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'instances.yaml')))
|
2024-01-12 20:37:37 +00:00
|
|
|
end
|
|
|
|
end
|