about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/models/status.rb3
-rw-r--r--spec/models/status_spec.rb11
2 files changed, 2 insertions, 12 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 6ba7b7a50..35655bff2 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -384,7 +384,8 @@ class Status < ApplicationRecord
 
     def account_silencing_filter(account)
       if account.silenced?
-        including_silenced_accounts
+        including_myself = left_outer_joins(:account).where(account_id: account.id).references(:accounts)
+        excluding_silenced_accounts.or(including_myself)
       else
         excluding_silenced_accounts
       end
diff --git a/spec/models/status_spec.rb b/spec/models/status_spec.rb
index d03005107..9d8670129 100644
--- a/spec/models/status_spec.rb
+++ b/spec/models/status_spec.rb
@@ -573,17 +573,6 @@ RSpec.describe Status, type: :model do
           expect(results).to include(es_status)
         end
       end
-
-      context 'where that account is silenced' do
-        it 'includes statuses from other accounts that are silenced' do
-          @account.update(silenced: true)
-          other_silenced_account = Fabricate(:account, silenced: true)
-          other_status = Fabricate(:status, account: other_silenced_account)
-
-          results = Status.as_public_timeline(@account)
-          expect(results).to include(other_status)
-        end
-      end
     end
   end