fix: honor group requireMention default

This commit is contained in:
Peter Steinberger
2025-12-23 12:53:30 +00:00
parent ea4b3b74bb
commit cd6ed79433
3 changed files with 12 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
- WhatsApp send now preserves existing JIDs (including group `@g.us`) instead of coercing to `@s.whatsapp.net`. (Thanks @arun-8687.)
- Telegram/WhatsApp: native replies now target the original inbound message; reply context is appended to `Body` and captured in `ReplyTo*` fields. (Thanks @joshp123 for the PR and follow-up question.)
- WhatsApp web creds persistence hardened; credentials are restored before auth checks and QR login auto-restarts if it stalls.
- Group chats now honor `inbound.groupChat.requireMention=false` as the default activation when no per-group override exists.
- Canvas defaults/A2UI auto-nav aligned; debug status overlay centered; redundant await removed in `CanvasManager`.
- Gateway launchd loop fixed by removing redundant `kickstart -k`.
- CLI now hints when Peekaboo is unauthorized.

View File

@@ -326,6 +326,11 @@ export async function getReplyFromConfig(
sessionCtx.Body = verboseCleaned;
sessionCtx.BodyStripped = verboseCleaned;
const defaultGroupActivation = () => {
const requireMention = cfg.inbound?.groupChat?.requireMention;
return requireMention === false ? "always" : "mention";
};
const isGroup =
typeof ctx.From === "string" &&
(ctx.From.includes("@g.us") || ctx.From.startsWith("group:"));
@@ -647,7 +652,7 @@ export async function getReplyFromConfig(
? (() => {
const activation =
normalizeGroupActivation(sessionEntry?.groupActivation) ??
"mention";
defaultGroupActivation();
const subject = sessionCtx.GroupSubject?.trim();
const members = sessionCtx.GroupMembers?.trim();
const subjectLine = subject

View File

@@ -852,7 +852,11 @@ export async function monitorWebProvider(
: `group:${conversationId}`;
const store = loadSessionStore(sessionStorePath);
const entry = store[key];
return normalizeGroupActivation(entry?.groupActivation) ?? "mention";
const requireMention = cfg.inbound?.groupChat?.requireMention;
const defaultActivation = requireMention === false ? "always" : "mention";
return (
normalizeGroupActivation(entry?.groupActivation) ?? defaultActivation
);
};
const resolveOwnerList = (selfE164?: string | null) => {