diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-26 11:39:40 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-26 11:39:40 -0500 |
commit | 35636272c0164372954b52a8a957ba08d645330d (patch) | |
tree | fb1b15318990752739bc903e8e8037bb2768094c /app/helpers | |
parent | 89f49712acae3cd5b20b73975ee584ebcab2efcd (diff) |
detect spam registrations + include account approvals/rejections in transparancy log
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/log_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
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 |