0
0
Fork 0

Export and import hide_notifications alongside user mutes (#10335)

* Export hide_notifications along with user mutes

* Import hide_notifications along with muted users list

* Add headers for CSV exports
This commit is contained in:
ThibG 2019-04-03 18:17:43 +02:00 committed by Eugen Rochko
parent daab45d4ae
commit d4882aa64a
8 changed files with 121 additions and 13 deletions

View file

@ -14,7 +14,11 @@ class Export
end
def to_muted_accounts_csv
to_csv account.muting.select(:username, :domain)
CSV.generate(headers: ['Account address', 'Hide notifications'], write_headers: true) do |csv|
account.mute_relationships.includes(:target_account).reorder(id: :desc).each do |mute|
csv << [acct(mute.target_account), mute.hide_notifications]
end
end
end
def to_following_accounts_csv