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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blun-king-cli",
3
- "version": "9.1.566",
3
+ "version": "9.1.567",
4
4
  "description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -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 = !matchesAny(ctx.text, access.ignorePatterns) && (mentionBypass || isMentioned(ctx, botUsername, access.mentionPatterns));
219
+ const addressed = mentioned || !ignored && mentionBypass;
217
220
  const targetedElsewhere = from.isBot === true && !addressed;
218
221
  return {
219
222
  action: "deliver",