File tree Expand file tree Collapse file tree
application/src/main/java/org/togetherjava/tjbot/features/moderation/scam Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public boolean isScam(Message message) {
6262 message .getAttachments ().stream ().map (Attachment ::fromDiscord ).toList ();
6363
6464 if (content .isBlank ()) {
65- return areAttachmentsSuspicious (attachments );
65+ return areAttachmentsScam (attachments );
6666 }
6767
6868 return isScam (content );
@@ -96,10 +96,10 @@ private boolean isScam(AnalyseResults results) {
9696 }
9797
9898 return results .onlyContainsUrls () && results .areAllUrlsWithAttachments ()
99- && areAttachmentsSuspicious (results .getUrlAttachments ());
99+ && areAttachmentsScam (results .getUrlAttachments ());
100100 }
101101
102- private boolean areAttachmentsSuspicious (Collection <Attachment > attachments ) {
102+ private boolean areAttachmentsScam (Collection <Attachment > attachments ) {
103103 long suspiciousAttachments =
104104 attachments .stream ().filter (this ::isAttachmentSuspicious ).count ();
105105 return suspiciousAttachments >= config .getSuspiciousAttachmentsThreshold ();
You can’t perform that action at this time.
0 commit comments