diff options
author | ThibG <thib@sitedethib.com> | 2019-04-08 07:28:27 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-04-08 07:28:27 +0200 |
commit | cb71c95e2292730befb8e12cf3b05d09d3e7443b (patch) | |
tree | b9fb7713050f3a898c9b3358d017093a09abf7ae /app/workers | |
parent | 619bbc23ef15ab32065dda67b461abfe6a71efe8 (diff) |
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
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/import/relationship_worker.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/workers/import/relationship_worker.rb b/app/workers/import/relationship_worker.rb index 43ec09ea2..616da6da9 100644 --- a/app/workers/import/relationship_worker.rb +++ b/app/workers/import/relationship_worker.rb @@ -5,15 +5,16 @@ class Import::RelationshipWorker sidekiq_options queue: 'pull', retry: 8, dead: false - def perform(account_id, target_account_uri, relationship, extra = nil) + def perform(account_id, target_account_uri, relationship, options = {}) from_account = Account.find(account_id) target_account = ResolveAccountService.new.call(target_account_uri) + options.symbolize_keys! return if target_account.nil? case relationship when 'follow' - FollowService.new.call(from_account, target_account) + FollowService.new.call(from_account, target_account, options) when 'unfollow' UnfollowService.new.call(from_account, target_account) when 'block' @@ -21,7 +22,7 @@ class Import::RelationshipWorker when 'unblock' UnblockService.new.call(from_account, target_account) when 'mute' - MuteService.new.call(from_account, target_account, notifications: extra) + MuteService.new.call(from_account, target_account, options) when 'unmute' UnmuteService.new.call(from_account, target_account) end |