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:
@ -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
|
||||
|
Reference in New Issue
Block a user