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:
parent
daab45d4ae
commit
d4882aa64a
8 changed files with 121 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue