From 35636272c0164372954b52a8a957ba08d645330d Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 26 Aug 2019 11:39:40 -0500 Subject: detect spam registrations + include account approvals/rejections in transparancy log --- app/helpers/log_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/helpers/log_helper.rb') diff --git a/app/helpers/log_helper.rb b/app/helpers/log_helper.rb index 86ee7be7e..9dd44e72d 100644 --- a/app/helpers/log_helper.rb +++ b/app/helpers/log_helper.rb @@ -103,6 +103,19 @@ module LogHelper when :memorialize LogWorker.perform_async("\xf0\x9f\x8f\x85 <#{source}> memorialized an account.") + + when :approve_registration + if target.respond_to?('map') + LogWorker.perform_async("\u2705 <#{source}> approved the account of #{target.map { |acct| "<#{acct}>" }.join(', ')}.\n\n#{reason ? "Comment: #{reason}" : ''}") + else + LogWorker.perform_async("\u2705 <#{source}> approved the account of <#{target}>.\n\n#{reason ? "Comment: #{reason}" : ''}") + end + when :reject_registration + if target.respond_to?('map') + LogWorker.perform_async("\u274c <#{source}> rejected the account of #{target.map { |acct| "<#{acct}>" }.join(', ')}.\n\n#{reason ? "Comment: #{reason}" : ''}") + else + LogWorker.perform_async("\u274c <#{source}> rejected the account of <#{target}>.\n\n#{reason ? "Comment: #{reason}" : ''}") + end end end end -- cgit