diff options
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 3 | ||||
-rw-r--r-- | app/services/post_status_service.rb | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index cbd232a50..ca40fac0a 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -46,6 +46,7 @@ class Api::V1::StatusesController < Api::BaseController notify: status_params[:notify], publish: status_params[:publish], visibility: status_params[:visibility], + local_only: status_params[:local_only], scheduled_at: status_params[:scheduled_at], application: doorkeeper_token.application, poll: status_params[:poll], @@ -77,6 +78,7 @@ class Api::V1::StatusesController < Api::BaseController notify: status_params[:notify], publish: status_params[:publish], visibility: status_params[:visibility], + local_only: status_params[:local_only], scheduled_at: status_params[:scheduled_at], application: doorkeeper_token.application, poll: status_params[:poll], @@ -145,6 +147,7 @@ class Api::V1::StatusesController < Api::BaseController :notify, :publish, :visibility, + :local_only, :scheduled_at, :content_type, :expires_at, diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 769b9aba0..216dedeac 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -13,6 +13,7 @@ class PostStatusService < BaseService # @option [Status] :thread Optional status to reply to # @option [Boolean] :sensitive # @option [String] :visibility + # @option [Boolean] :local_only # @option [String] :spoiler_text # @option [String] :title # @option [String] :footer @@ -215,6 +216,7 @@ class PostStatusService < BaseService title: @options[:title], footer: @options[:footer], visibility: @visibility, + local_only: @options[:local_only], language: language_from_option(@options[:language]) || @account.user&.setting_default_language&.presence || LanguageDetector.instance.detect(@text, @account), application: @options[:application], published: @options[:publish], |