From 21438b54bdaf3c557ec9ebbc482a2c418d8c64f8 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sun, 19 Jul 2020 18:50:24 -0500 Subject: [Feature] Add manual publishing option --- app/serializers/rest/preferences_serializer.rb | 6 ++++++ app/serializers/rest/status_serializer.rb | 2 ++ 2 files changed, 8 insertions(+) (limited to 'app/serializers/rest') 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 -- cgit