Add preference to hide following/followers lists (#7532)
* Add preference to hide following/followers lists - Public pages - ActivityPub collections (does not return pages but does give total) - REST API (unless it's your own) (does not federate) Fix #6901 * Add preference * Add delegation * Fix issue * Fix issue
This commit is contained in:
parent
919eef3098
commit
1e02dc8715
19 changed files with 58 additions and 9 deletions
|
@ -136,6 +136,7 @@ class Account < ApplicationRecord
|
|||
:moderator?,
|
||||
:staff?,
|
||||
:locale,
|
||||
:hides_network?,
|
||||
to: :user,
|
||||
prefix: true,
|
||||
allow_nil: true
|
||||
|
|
|
@ -86,7 +86,7 @@ class User < ApplicationRecord
|
|||
has_many :session_activations, dependent: :destroy
|
||||
|
||||
delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal,
|
||||
:reduce_motion, :system_font_ui, :noindex, :theme, :display_sensitive_media,
|
||||
:reduce_motion, :system_font_ui, :noindex, :theme, :display_sensitive_media, :hide_network,
|
||||
to: :settings, prefix: :setting, allow_nil: false
|
||||
|
||||
attr_accessor :invite_code
|
||||
|
@ -219,6 +219,10 @@ class User < ApplicationRecord
|
|||
settings.notification_emails['digest']
|
||||
end
|
||||
|
||||
def hides_network?
|
||||
@hides_network ||= settings.hide_network
|
||||
end
|
||||
|
||||
def token_for_app(a)
|
||||
return nil if a.nil? || a.owner != self
|
||||
Doorkeeper::AccessToken
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue