about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/services/update_status_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/update_status_service.rb b/app/services/update_status_service.rb
index 327cc74ea..015010588 100644
--- a/app/services/update_status_service.rb
+++ b/app/services/update_status_service.rb
@@ -13,6 +13,7 @@ class UpdateStatusService < BaseService
     language
     sensitive
     visibility
+    local_only
     media_attachments
     media_attachment_ids
     application
@@ -36,7 +37,8 @@ class UpdateStatusService < BaseService
     @params[:text]        ||= ''
     @params[:original_text] = @params[:text]
     @params[:published]     = true if @status.published?
-    (@params[:edited]     ||= 1 + @status.edited) if @params[:published].presence || @status.published?
+    @params[:local_only]    = @status.local_only? if @params[:local_only] == true && (@status.edited.positive? || @status.published?)
+    @params[:edited]      ||= 1 + @status.edited if @params[:published].presence || @status.published?
 
     update_tags if @status.local?