about summary refs log tree commit diff
path: root/app/lib/spam_check.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2021-01-26 23:21:32 +0100
committerGitHub <noreply@github.com>2021-01-26 23:21:32 +0100
commit52ff3ca675ecac0ff32990b6321fb5e349e6dc59 (patch)
treeeeeeeead25872b19b34b31e3ccbd543d3e2fd9b8 /app/lib/spam_check.rb
parentca6c62068e35537251cc650c8b2d03a1a2163d06 (diff)
parent00e55445b9aa5a399a9f8b76e42fde9da2c399fd (diff)
Merge pull request #1491 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
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