about summary refs log tree commit diff
path: root/app/lib/command_tag/commands
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-07-26 06:38:34 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:16 -0500
commita72e63329495228659f01d1fd254e954268afb69 (patch)
tree0927ae0403eb4417a0a626ad5eebc5ed8373e4ba /app/lib/command_tag/commands
parentd9c8abca54326c13810e87352e33a85fa6ca04db (diff)
[Privacy, Command Tags] Set semiprivate flag on mixed-privacy posts
Diffstat (limited to 'app/lib/command_tag/commands')
-rw-r--r--app/lib/command_tag/commands/status_tools.rb6
1 files changed, 6 insertions, 0 deletions
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