blun-king-cli 9.1.566 → 9.1.567
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -212,8 +212,11 @@ function gate(ctx, botUsername) {
|
|
|
212
212
|
if (policy === void 0) return { action: "drop" };
|
|
213
213
|
const groupAllowFrom = policy.allowFrom ?? [];
|
|
214
214
|
if (groupAllowFrom.length > 0 && !groupAllowFrom.includes(senderId)) return { action: "drop" };
|
|
215
|
+
const ignored = matchesAny(ctx.text, access.ignorePatterns);
|
|
216
|
+
const mentioned = !ignored && isMentioned(ctx, botUsername, access.mentionPatterns);
|
|
217
|
+
if (policy.requireMention === true && !mentioned) return { action: "drop" };
|
|
215
218
|
const mentionBypass = from.isBot !== true && (policy.alwaysAllowFrom ?? []).includes(senderId);
|
|
216
|
-
const addressed = !
|
|
219
|
+
const addressed = mentioned || !ignored && mentionBypass;
|
|
217
220
|
const targetedElsewhere = from.isBot === true && !addressed;
|
|
218
221
|
return {
|
|
219
222
|
action: "deliver",
|