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

@ -5,7 +5,7 @@ class Import::RelationshipWorker
sidekiq_options queue: 'pull', retry: 8, dead: false
def perform(account_id, target_account_uri, relationship)
def perform(account_id, target_account_uri, relationship, extra = nil)
from_account = Account.find(account_id)
target_account = ResolveAccountService.new.call(target_account_uri)
@ -21,7 +21,7 @@ class Import::RelationshipWorker
when 'unblock'
UnblockService.new.call(from_account, target_account)
when 'mute'
MuteService.new.call(from_account, target_account)
MuteService.new.call(from_account, target_account, notifications: extra)
when 'unmute'
UnmuteService.new.call(from_account, target_account)
end