diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-31 23:18:17 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-31 23:18:17 -0500 |
commit | 0dc67e07f1c53d5feae19417743fb225dfa64178 (patch) | |
tree | 57137efe2ca3108e2ac3c72b01d0779a6d59f428 | |
parent | bf5db4f11a21d9b3b4275f62b39288e5db7a3b37 (diff) |
[Command Tags] Add privacy alias for community visibility
-rw-r--r-- | app/lib/command_tag/command/status_tools.rb | 3 | ||||
-rw-r--r-- | app/lib/command_tag/processor.rb | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/lib/command_tag/command/status_tools.rb b/app/lib/command_tag/command/status_tools.rb index 5cc11dde2..9990dc136 100644 --- a/app/lib/command_tag/command/status_tools.rb +++ b/app/lib/command_tag/command/status_tools.rb @@ -61,6 +61,9 @@ module CommandTag::Command::StatusTools mention(resolve_mention(target)) end end + elsif args[0] == 'community' + @status.visibility = :public + @status.domain_permissions.create_or_update(domain: '*', visibility: :unlisted) else args[1..-1].flat_map(&:split).uniq.each do |domain| domain = normalize_domain(domain) unless domain == '*' diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb index f758994a0..8461e902f 100644 --- a/app/lib/command_tag/processor.rb +++ b/app/lib/command_tag/processor.rb @@ -300,11 +300,13 @@ class CommandTag::Processor @account.user.setting_default_privacy when 'to', 'allow', 'allow-from', 'from' 'cc' + when 'm', 'l', 'mp', 'monsterpit', 'local' + 'community' else arg.strip end - %w(public unlisted private limited direct cc).include?(arg) ? arg : nil + %w(public unlisted private limited direct cc community).include?(arg) ? arg : nil end def read_falsy_from(arg) |