about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/account_interactions.rb6
-rw-r--r--app/models/follow_request.rb2
-rw-r--r--app/services/follow_service.rb2
-rw-r--r--app/services/notify_service.rb2
4 files changed, 8 insertions, 4 deletions
diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb
index 088fef4da..60fd6ded5 100644
--- a/app/models/concerns/account_interactions.rb
+++ b/app/models/concerns/account_interactions.rb
@@ -81,7 +81,7 @@ module AccountInteractions
       rel.show_reblogs = reblogs
       rel.save!
     end
-    
+
     rel
   end
 
@@ -156,6 +156,10 @@ module AccountInteractions
     mute_relationships.where(target_account: other_account, hide_notifications: true).exists?
   end
 
+  def muting_reblogs?(other_account)
+    active_relationships.where(target_account: other_account, show_reblogs: false).exists?
+  end
+
   def requested?(other_account)
     follow_requests.where(target_account: other_account).exists?
   end
diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb
index 0608ffabc..1a1c52382 100644
--- a/app/models/follow_request.rb
+++ b/app/models/follow_request.rb
@@ -22,7 +22,7 @@ class FollowRequest < ApplicationRecord
   validates :account_id, uniqueness: { scope: :target_account_id }
 
   def authorize!
-    account.follow!(target_account, reblogs: reblogs)
+    account.follow!(target_account, reblogs: show_reblogs)
     MergeWorker.perform_async(target_account.id, account.id)
 
     destroy!
diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb
index 70572110d..6db591999 100644
--- a/app/services/follow_service.rb
+++ b/app/services/follow_service.rb
@@ -39,7 +39,7 @@ class FollowService < BaseService
   private
 
   def request_follow(source_account, target_account, reblogs: true)
-    follow_request = FollowRequest.create!(account: source_account, target_account: target_account, reblogs: reblogs)
+    follow_request = FollowRequest.create!(account: source_account, target_account: target_account, show_reblogs: reblogs)
 
     if target_account.local?
       NotifyService.new.call(target_account, follow_request)
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb
index fb09df983..3fa3f152c 100644
--- a/app/services/notify_service.rb
+++ b/app/services/notify_service.rb
@@ -29,7 +29,7 @@ class NotifyService < BaseService
   end
 
   def blocked_reblog?
-    false
+    @recipient.muting_reblogs?(@notification.from_account)
   end
 
   def blocked_follow_request?