about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-04-08 18:17:22 +0200
committerGitHub <noreply@github.com>2019-04-08 18:17:22 +0200
commitfc2f7ee8710b498c4533e229aff6391396aa7213 (patch)
tree9576b254773166a419b932c50e8f4d354bea73c3 /app/workers
parent30500dff7cbf27fbee6eb45e20cc24ca0b7a9e77 (diff)
parent63837a4b781ad27a4af895b0c983d4aff57d80e3 (diff)
Merge pull request #983 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/import/relationship_worker.rb7
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