File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
main/java/org/togetherjava/tjbot/features/moderation/scam
test/java/org/togetherjava/tjbot/features/moderation/scam Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public ScamDetector(Config config) {
53
53
public boolean isScam (Message message ) {
54
54
Member author = message .getMember ();
55
55
boolean isTrustedUser = author != null
56
- && author .getRoles ().stream ().map (Role ::getName ).noneMatch (hasTrustedRole );
56
+ && author .getRoles ().stream ().map (Role ::getName ).anyMatch (hasTrustedRole );
57
57
if (isTrustedUser ) {
58
58
return false ;
59
59
}
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ void ignoreTrustedUser() {
223
223
boolean isScamResult = scamDetector .isScam (message );
224
224
225
225
// THEN flags it as harmless
226
- assertTrue (isScamResult );
226
+ assertFalse (isScamResult );
227
227
}
228
228
229
229
private static Message createMessageMock (String content , List <Message .Attachment > attachments ) {
You can’t perform that action at this time.
0 commit comments