about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/lib/bangtags.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index fd3cd72d1..52fc7bf9b 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -504,7 +504,8 @@ class Bangtags
           next if cmd[1].nil?
           case cmd[1].downcase
           when 'silence', 'unsilence', 'suspend', 'unsuspend', 'forgive'
-            chunk = "`admin:#{cmd[1].downcase}`:\n"
+            @status.content_type = 'text/markdown'
+            chunk = "<code>admin:#{cmd[1].downcase}</code>:\n"
             @tf_cmds.push(cmd)
             @component_stack.push(:tf)
           end
@@ -534,7 +535,7 @@ class Bangtags
                   parts = c.split('@')[1..2]
                   a = Account.find_by(username: parts[0], domain: parts[1])
                   next if a.nil?
-                  output << "    Silenced `@#{parts.join('@')}`"
+                  output << "    Silenced <code>@#{parts.join('@')}</code>"
                   Admin::ActionLog.create(account: @account, action: :silence, target: a)
                   a.silence!
                   a.save
@@ -550,7 +551,7 @@ class Bangtags
                   domain_block = DomainBlock.find_or_create_by(domain: c)
                   domain_block.severity = "silence"
                   domain_block.save
-                  output << "    Silenced `#{c}`"
+                  output << "    Silenced <code>#{c}</code>"
                   Admin::ActionLog.create(account: @account, action: :create, target: domain_block)
                   BlockDomainService.new.call(domain_block)
                 end
@@ -563,7 +564,7 @@ class Bangtags
                   parts = c.split('@')[1..2]
                   a = Account.find_by(username: parts[0], domain: parts[1])
                   next if a.nil?
-                  output << "    Reset policy for `@#{parts.join('@')}`"
+                  output << "    Reset policy for <code>@#{parts.join('@')}</code>"
                   Admin::ActionLog.create(account: @account, action: :unsilence, target: a)
                   a.unsilence!
                   Admin::ActionLog.create(account: @account, action: :unsuspend, target: a)
@@ -574,7 +575,7 @@ class Bangtags
                   next if c.end_with?('monsterpit.net', 'tailma.ws')
                   domain_block = DomainBlock.find_by(domain: c)
                   next if domain_block.nil?
-                  output << "    Reset policy for `#{c}`"
+                  output << "    Reset policy for <code>#{c}<code>"
                   Admin::ActionLog.create(account: @account, action: :destroy, target: domain_block)
                   UnblockDomainService.new.call(domain_block)
                 end
@@ -587,7 +588,7 @@ class Bangtags
                   parts = c.split('@')[1..2]
                   a = Account.find_by(username: parts[0], domain: parts[1])
                   next if a.nil?
-                  output << "    Suspended `@#{parts.join('@')}`"
+                  output << "    Suspended <code>@#{parts.join('@')}</code>"
                   Admin::ActionLog.create(account: @account, action: :suspend, target: a)
                   SuspendAccountService.new.call(a, include_user: true)
                 elsif c.match?(/\A[\w\-]+\.[\w\-]+(?:\.[\w\-]+)*\Z/)
@@ -603,7 +604,7 @@ class Bangtags
                   domain_block.severity = "suspend"
                   domain_block.reject_media = true
                   domain_block.save
-                  output << "    Suspended `#{c}`"
+                  output << "    Suspended <code>#{c}</code>"
                   Admin::ActionLog.create(account: @account, action: :create, target: domain_block)
                   BlockDomainService.new.call(domain_block)
                 end