automod: only apply 1 matching rule on member join

This is consistent with message rule behaviour.
This commit is contained in:
Dragory 2020-05-22 20:53:25 +03:00
parent 130afa61eb
commit fb8dc03aac
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1536,11 +1536,13 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
const spamMatch = await this.matchOtherSpamInRule(rule, member.id);
if (spamMatch) {
await this.applyActionsOnMatch(rule, spamMatch);
break; // Don't apply multiple rules to the same join
}
const joinMatch = await this.matchMemberJoinTriggerInRule(rule, member);
if (joinMatch) {
await this.applyActionsOnMatch(rule, joinMatch);
break; // Don't apply multiple rules to the same join
}
}
});