Add keep_privacy setting

This commit is contained in:
KMY 2023-08-22 08:20:51 +09:00
parent 197f0b8ea3
commit 5daf9cdf6e
9 changed files with 31 additions and 3 deletions

View file

@ -2,6 +2,7 @@
class REST::PreferencesSerializer < ActiveModel::Serializer
attribute :posting_default_privacy, key: 'posting:default:visibility'
attribute :posting_stay_privacy, key: 'posting:keep:visibility'
attribute :posting_default_searchability, key: 'posting:default:searchability'
attribute :posting_default_sensitive, key: 'posting:default:sensitive'
attribute :posting_default_language, key: 'posting:default:language'
@ -14,6 +15,10 @@ class REST::PreferencesSerializer < ActiveModel::Serializer
object.user.setting_default_privacy
end
def posting_stay_privacy
object.user.setting_stay_privacy
end
def posting_default_searchability
object.user.setting_default_searchability
end