0
0
Fork 0

Export and import show_reblogs together with following list (#10495)

* Refactor imports

* Export show_reblogs when exporting list of followed users

* Add support for importing show_reblogs with following collection

* Fix tests
This commit is contained in:
ThibG 2019-04-08 07:28:27 +02:00 committed by Eugen Rochko
parent 619bbc23ef
commit cb71c95e22
7 changed files with 112 additions and 17 deletions

View file

@ -22,7 +22,11 @@ class Export
end
def to_following_accounts_csv
to_csv account.following.select(:username, :domain)
CSV.generate(headers: ['Account address', 'Show boosts'], write_headers: true) do |csv|
account.active_relationships.includes(:target_account).reorder(id: :desc).each do |follow|
csv << [acct(follow.target_account), follow.show_reblogs]
end
end
end
def to_lists_csv