about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-07-10 21:00:32 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-10 14:00:32 +0200
commit2b9721d1b38319d70bed98e76a0fe1d648780298 (patch)
tree4e1994def2b461c88b86eea164aa1223069878fb /app/serializers
parent617208053c2bf935d2dd3944bb2b9192a388f0b4 (diff)
Add setting a always mark media as sensitive (#4136)
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/initial_state_serializer.rb1
-rw-r--r--app/serializers/rest/credential_account_serializer.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb
index 84f9e23a6..49ff9e377 100644
--- a/app/serializers/initial_state_serializer.rb
+++ b/app/serializers/initial_state_serializer.rb
@@ -23,6 +23,7 @@ class InitialStateSerializer < ActiveModel::Serializer
     {
       me: object.current_account.id,
       default_privacy: object.current_account.user.setting_default_privacy,
+      default_sensitive: object.current_account.user.setting_default_sensitive,
     }
   end
 
diff --git a/app/serializers/rest/credential_account_serializer.rb b/app/serializers/rest/credential_account_serializer.rb
index 094b831c9..870d8b71f 100644
--- a/app/serializers/rest/credential_account_serializer.rb
+++ b/app/serializers/rest/credential_account_serializer.rb
@@ -7,6 +7,7 @@ class REST::CredentialAccountSerializer < REST::AccountSerializer
     user = object.user
     {
       privacy: user.setting_default_privacy,
+      sensitive: user.setting_default_sensitive,
       note: object.note,
     }
   end