diff options
author | ThibG <thib@sitedethib.com> | 2020-03-09 00:10:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 00:10:29 +0100 |
commit | b154428e14861f5cdc7ba6e5f8e582dbf7d0a1c0 (patch) | |
tree | ce3ebad6225a4bf7ed466251c4c3d46b1c0d3ba6 /app/models | |
parent | 9660aa4543deff41c60d131e081137f84e771499 (diff) |
Add federation support for the "hide network" preference (#11673)
* Change ActivityPub follower/following collections to not link first page * Add support for hiding followers and following of remote users * Switch to using a single `hide_collections` column * Address code style remarks
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index a1b4a065b..6aceb809c 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -46,6 +46,7 @@ # silenced_at :datetime # suspended_at :datetime # trust_level :integer +# hide_collections :boolean # class Account < ApplicationRecord @@ -323,6 +324,14 @@ class Account < ApplicationRecord save! end + def hides_followers? + hide_collections? || user_hides_network? + end + + def hides_following? + hide_collections? || user_hides_network? + end + def object_type :person end |