about summary refs log tree commit diff
path: root/app/lib/spam_check.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-01-26 14:01:30 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-01-26 14:01:30 +0100
commitb81710c02c9d8f27d417aa11b288a5b4e32bd5d5 (patch)
tree2f5ba10c2eb3c667dab2dfdb77c3d1724677ce87 /app/lib/spam_check.rb
parentd1255ab8a5101bc04af4a5214f975edf443a37d9 (diff)
parent7f1c56954b46b26b4dadfa92047f1ee5d7f9ad0a (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `CONTRIBUTING.md`:
  Not a real conflict, glitch-soc quotes the upstream file, which has been
  changed. Update the quote.
Diffstat (limited to 'app/lib/spam_check.rb')
-rw-r--r--app/lib/spam_check.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/spam_check.rb b/app/lib/spam_check.rb
index 68e586d00..dcb2db9ca 100644
--- a/app/lib/spam_check.rb
+++ b/app/lib/spam_check.rb
@@ -186,9 +186,9 @@ class SpamCheck
 
   def matching_status_ids
     if nilsimsa?
-      other_digests.select { |record| record.start_with?('nilsimsa') && nilsimsa_compare_value(digest, record.split(':')[1]) >= NILSIMSA_COMPARE_THRESHOLD }.filter_map { |record| record.split(':')[2] }
+      other_digests.filter_map { |record| record.split(':')[2] if record.start_with?('nilsimsa') && nilsimsa_compare_value(digest, record.split(':')[1]) >= NILSIMSA_COMPARE_THRESHOLD }
     else
-      other_digests.select { |record| record.start_with?('md5') && record.split(':')[1] == digest }.filter_map { |record| record.split(':')[2] }
+      other_digests.filter_map { |record| record.split(':')[2] if record.start_with?('md5') && record.split(':')[1] == digest }
     end
   end