fix: honor group requireMention default
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user