Merge pull request #253 from glitch-soc/prevent-local-only-federation

prevent federation of local-only statuses
This commit is contained in:
beatrix
2017-12-16 09:26:48 -05:00
committed by GitHub
8 changed files with 120 additions and 8 deletions

8
lib/tasks/glitchsoc.rake Normal file
View File

@@ -0,0 +1,8 @@
namespace :glitchsoc do
desc 'Backfill local-only flag on statuses table'
task backfill_local_only: :environment do
Status.local.where(local_only: nil).find_each do |st|
ActiveRecord::Base.logger.silence { st.update_attribute(:local_only, st.marked_local_only?) }
end
end
end