diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-19 18:50:24 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:43:59 -0500 |
commit | 21438b54bdaf3c557ec9ebbc482a2c418d8c64f8 (patch) | |
tree | e577d047af196823227e675dea52b2fc2fa842c6 /app/serializers/rest | |
parent | 8c8ad0ac0ed0d3e67f3e521068b59edd4054f1e9 (diff) |
[Feature] Add manual publishing option
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/preferences_serializer.rb | 6 | ||||
-rw-r--r-- | app/serializers/rest/status_serializer.rb | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app/serializers/rest/preferences_serializer.rb b/app/serializers/rest/preferences_serializer.rb index 119f0e06d..5220aa034 100644 --- a/app/serializers/rest/preferences_serializer.rb +++ b/app/serializers/rest/preferences_serializer.rb @@ -8,6 +8,8 @@ class REST::PreferencesSerializer < ActiveModel::Serializer attribute :reading_default_sensitive_media, key: 'reading:expand:media' attribute :reading_default_sensitive_text, key: 'reading:expand:spoilers' + attribute :posting_default_manual_publish, key: 'posting:default:manual_publish' + def posting_default_privacy object.user.setting_default_privacy end @@ -27,4 +29,8 @@ class REST::PreferencesSerializer < ActiveModel::Serializer def reading_default_sensitive_text object.user.setting_expand_spoilers end + + def posting_default_manual_publish + object.user.setting_manual_publish + end end diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index b5650544f..7a2dd6db9 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -20,6 +20,8 @@ class REST::StatusSerializer < ActiveModel::Serializer attribute :text, if: :source_requested? attribute :content_type, if: :source_requested? + attribute :published if :local? + belongs_to :reblog, serializer: REST::StatusSerializer belongs_to :application, if: :show_application? belongs_to :account, serializer: REST::AccountSerializer |