about summary refs log tree commit diff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-01-21 19:36:33 +0100
committerThibG <thib@sitedethib.com>2019-01-27 13:56:41 +0100
commit05415fa5d38e988d967cc783dd2eb0852852fce2 (patch)
treebfc59aee525aaef4b8de40316574872dd4a696a7 /app/models/user.rb
parent64cb9b691310a8b955e23b57ed0af51686f3ceb4 (diff)
Make storing and displaying application used to toot opt-in
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index fbb6545db..ce9ef2a13 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -100,7 +100,7 @@ class User < ApplicationRecord
 
   delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal,
            :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_media, :hide_network, :hide_followers_count,
-           :expand_spoilers, :default_language, :aggregate_reblogs, to: :settings, prefix: :setting, allow_nil: false
+           :expand_spoilers, :default_language, :aggregate_reblogs, :show_application, to: :settings, prefix: :setting, allow_nil: false
 
   attr_reader :invite_code
 
@@ -244,6 +244,10 @@ class User < ApplicationRecord
     @aggregates_reblogs ||= settings.aggregate_reblogs
   end
 
+  def shows_application?
+    @shows_application ||= settings.shows_application
+  end
+
   def token_for_app(a)
     return nil if a.nil? || a.owner != self
     Doorkeeper::AccessToken