about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-19 20:25:54 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-19 20:25:54 +0100
commit4aa5ebe59142eedbb1aa9dad88c608dda9ad8d6c (patch)
treefffa7f74235f1a4be559bb26cf1373758f37727c /app/models
parent9e99b8c068b11ec2d0f3b5d560cae0166c247342 (diff)
Split public timeline into "public timeline" which is local, and
"whole known network" which is what public timeline used to be

Only domain blocks with suspend severity will block PuSH subscriptions
Silenced accounts should not appear in conversations unless followed
Diffstat (limited to 'app/models')
-rw-r--r--app/models/domain_block.rb2
-rw-r--r--app/models/status.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb
index b4606da60..3548ccd69 100644
--- a/app/models/domain_block.rb
+++ b/app/models/domain_block.rb
@@ -6,6 +6,6 @@ class DomainBlock < ApplicationRecord
   validates :domain, presence: true, uniqueness: true
 
   def self.blocked?(domain)
-    where(domain: domain).exists?
+    where(domain: domain, severity: :suspend).exists?
   end
 end
diff --git a/app/models/status.rb b/app/models/status.rb
index 46d92ea33..1b40897f3 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -192,6 +192,6 @@ class Status < ApplicationRecord
   private
 
   def filter_from_context?(status, account)
-    account&.blocking?(status.account_id) || !status.permitted?(account)
+    account&.blocking?(status.account_id) || (status.account.silenced? && !account&.following?(status.account_id)) || !status.permitted?(account)
   end
 end