diff options
author | ThibG <thib@sitedethib.com> | 2018-05-18 17:20:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-18 17:20:32 +0200 |
commit | 625c4f36ef394215e65e19157bfaf60e7de94b5f (patch) | |
tree | 72560d046b60c8478d10f26c212a70870e50eb2d /app/models/user.rb | |
parent | 023dfa119ed43fe35188e560c24cd3091c14ad0b (diff) | |
parent | 765fc6700cefcf326e8e4104f7f82ac5ed9b9bea (diff) |
Merge pull request #490 from glitch-soc/merge-upstream
Merge with tootsuite @ 57b503d4ef0754e4651eae26b628cba60e1ab4e9
Diffstat (limited to 'app/models/user.rb')
-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 d5ca9be36..9bdf8807f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -86,7 +86,7 @@ class User < ApplicationRecord has_many :session_activations, dependent: :destroy delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal, - :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_sensitive_media, + :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :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 |