From a72e63329495228659f01d1fd254e954268afb69 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sun, 26 Jul 2020 06:38:34 -0500 Subject: [Privacy, Command Tags] Set semiprivate flag on mixed-privacy posts --- app/lib/command_tag/commands/status_tools.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/lib/command_tag/commands') diff --git a/app/lib/command_tag/commands/status_tools.rb b/app/lib/command_tag/commands/status_tools.rb index 23bdcbfc3..0e6524001 100644 --- a/app/lib/command_tag/commands/status_tools.rb +++ b/app/lib/command_tag/commands/status_tools.rb @@ -27,4 +27,10 @@ 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 -- cgit