mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 11:46:22 +00:00
26 lines
705 B
Ruby
26 lines
705 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Agrega threads.net a las listas de bloqueo
|
||
|
class AddFedipactToFediblocks < ActiveRecord::Migration[6.1]
|
||
|
def up
|
||
|
fedipact =
|
||
|
ActivityPub::Fediblock.create(
|
||
|
hostnames: %w[threads.net],
|
||
|
title: 'Fedipact',
|
||
|
url: 'https://fedipact.online/',
|
||
|
format: 'none'
|
||
|
)
|
||
|
|
||
|
DeploySocialDistributedPress.find_each do |deploy|
|
||
|
FediblockState.create(site: deploy.site, fediblock: fedipact, aasm_state: 'disabled').tap do |f|
|
||
|
f.enable!
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def down
|
||
|
fedipact = ActivityPub::Fediblock.find_by(url: 'https://fedipact.online/').delete
|
||
|
FediblockState.where(fediblock_id: fedipact.id).delete_all
|
||
|
end
|
||
|
end
|