Add setting to not aggregate reblogs (#9248)
* Add setting to not aggregate reblogs Fixes #9222 * Handle cases where user is nil in add_to_home and add_to_list * Add hint for setting_aggregate_reblogs option * Reword setting_aggregate_reblogs label
This commit is contained in:
parent
6b78e5b5ab
commit
81bda7d67c
7 changed files with 23 additions and 7 deletions
|
@ -95,7 +95,7 @@ class User < ApplicationRecord
|
|||
|
||||
delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal,
|
||||
:reduce_motion, :system_font_ui, :noindex, :theme, :display_media, :hide_network,
|
||||
:expand_spoilers, :default_language, to: :settings, prefix: :setting, allow_nil: false
|
||||
:expand_spoilers, :default_language, :aggregate_reblogs, to: :settings, prefix: :setting, allow_nil: false
|
||||
|
||||
attr_reader :invite_code
|
||||
|
||||
|
@ -231,6 +231,10 @@ class User < ApplicationRecord
|
|||
@hides_network ||= settings.hide_network
|
||||
end
|
||||
|
||||
def aggregates_reblogs?
|
||||
@aggregates_reblogs ||= settings.aggregate_reblogs
|
||||
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