about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-04-12 01:38:18 -0700
committerReverite <github@reverite.sh>2019-04-12 01:38:18 -0700
commite10a9794f4ed7c90e3190f285359f55dd00da435 (patch)
tree579ebf95d6bbf091d05e66907a9c8168c926e0af /app/workers
parentff736905fa534f7189e57c1d0c14fbac45f239a1 (diff)
parentbb50ec2e6687238ad8b2ec545a73270fee7a7b09 (diff)
Merge branch 'glitch' into production
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 e9db20a46..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)
+  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)
+      MuteService.new.call(from_account, target_account, options)
     when 'unmute'
       UnmuteService.new.call(from_account, target_account)
     end