automod: only apply 1 matching rule on member join
This is consistent with message rule behaviour.
This commit is contained in:
parent
130afa61eb
commit
fb8dc03aac
1 changed files with 2 additions and 0 deletions
|
@ -1536,11 +1536,13 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
|
||||||
const spamMatch = await this.matchOtherSpamInRule(rule, member.id);
|
const spamMatch = await this.matchOtherSpamInRule(rule, member.id);
|
||||||
if (spamMatch) {
|
if (spamMatch) {
|
||||||
await this.applyActionsOnMatch(rule, spamMatch);
|
await this.applyActionsOnMatch(rule, spamMatch);
|
||||||
|
break; // Don't apply multiple rules to the same join
|
||||||
}
|
}
|
||||||
|
|
||||||
const joinMatch = await this.matchMemberJoinTriggerInRule(rule, member);
|
const joinMatch = await this.matchMemberJoinTriggerInRule(rule, member);
|
||||||
if (joinMatch) {
|
if (joinMatch) {
|
||||||
await this.applyActionsOnMatch(rule, joinMatch);
|
await this.applyActionsOnMatch(rule, joinMatch);
|
||||||
|
break; // Don't apply multiple rules to the same join
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue