0
0
Fork 0

Add /api/v1/accounts/familiar_followers to REST API (#17700)

* Add `/api/v1/accounts/familiar_followers` to REST API

* Change hide network preference to be stored consistently for local and remote accounts

* Add dummy classes to migration

* Apply suggestions from code review

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko 2022-03-07 09:36:47 +01:00 committed by GitHub
parent c439e13e12
commit edf09ec747
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 169 additions and 32 deletions

View file

@ -349,11 +349,11 @@ class Account < ApplicationRecord
end
def hides_followers?
hide_collections? || user_hides_network?
hide_collections?
end
def hides_following?
hide_collections? || user_hides_network?
hide_collections?
end
def object_type

View file

@ -126,7 +126,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_media, :hide_network,
:reduce_motion, :system_font_ui, :noindex, :theme, :display_media,
:expand_spoilers, :default_language, :aggregate_reblogs, :show_application,
:advanced_layout, :use_blurhash, :use_pending_items, :trends, :crop_images,
:disable_swiping,
@ -273,10 +273,6 @@ class User < ApplicationRecord
settings.notification_emails['trending_tag']
end
def hides_network?
@hides_network ||= settings.hide_network
end
def aggregates_reblogs?
@aggregates_reblogs ||= settings.aggregate_reblogs
end