From 22326c3c028ff9e542ba4cbc8422076c420287fc Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Mon, 27 Jul 2020 07:45:50 -0500 Subject: [Privacy] Improve handling of mixed permissions --- app/lib/command_tag/commands/status_tools.rb | 6 ------ app/lib/command_tag/processor.rb | 9 --------- 2 files changed, 15 deletions(-) (limited to 'app/lib') diff --git a/app/lib/command_tag/commands/status_tools.rb b/app/lib/command_tag/commands/status_tools.rb index 0e6524001..23bdcbfc3 100644 --- a/app/lib/command_tag/commands/status_tools.rb +++ b/app/lib/command_tag/commands/status_tools.rb @@ -27,10 +27,4 @@ module CommandTag::Commands::StatusTools alias handle_v_before_save handle_visibility_before_save alias handle_privacy_before_save handle_visibility_before_save - - def handle_semiprivate_before_save(args) - return unless author_of_status? - - @semiprivate = args.blank? || read_boolean_from(args[0]) - end end diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb index e9b8f5c05..da6d49160 100644 --- a/app/lib/command_tag/processor.rb +++ b/app/lib/command_tag/processor.rb @@ -59,7 +59,6 @@ class CommandTag::Processor elsif @status.destroyed? %w(after_destroy once_after_destroy).each { |suffix| execute_statements(suffix) } else - update_semiprivate_attribute @status.text = @text process_inline_images! if @status.save @@ -175,14 +174,6 @@ class CommandTag::Processor @status.destroy unless @status.destroyed? end - def status_still_semiprivate? - @status.domain_permissions.exists? || @account.followers.where(domain: @account.domain_permissions.select(:domain)).exists? - end - - def update_semiprivate_attribute - @status.semiprivate = @semiprivate.presence || status_still_semiprivate? - end - def normalize(text) text.to_s.strip.downcase end -- cgit