diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-14 12:49:14 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:18 -0500 |
commit | 652cd433896930247b79eee3c57954f8d77a8e2f (patch) | |
tree | 3982cd777bef9e30270339e1e59321fc079166c3 | |
parent | 63af39b108ea73cbb6aad225e7881922dfd6ac2e (diff) |
[Privacy] Allow setting local-only flag on edits if original was unpublished
-rw-r--r-- | app/services/update_status_service.rb | 4 |
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? |