diff options
author | ThibG <thib@sitedethib.com> | 2018-12-09 13:03:01 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-12-09 13:03:01 +0100 |
commit | 81bda7d67c984c9bfcb5bca94e50cec6405b492e (patch) | |
tree | d9742d61a1f80bd494f8a40305658daef7d3b410 /app/models | |
parent | 6b78e5b5ab813625152149b7e215d0568a595cdc (diff) |
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
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 453ffa8b0..f4130d7b1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 |