fix(whatsapp): suppress typing during heartbeats
- Prevent typing indicator during heartbeat runs - Add regression tests Co-authored-by: Jake <mcinteerj@gmail.com>
This commit is contained in:
@@ -467,7 +467,8 @@ export async function getReplyFromConfig(
|
||||
const isFirstTurnInSession = isNewSession || !systemSent;
|
||||
const isGroupChat = sessionCtx.ChatType === "group";
|
||||
const wasMentioned = ctx.WasMentioned === true;
|
||||
const shouldEagerType = !isGroupChat || wasMentioned;
|
||||
const isHeartbeat = opts?.isHeartbeat === true;
|
||||
const shouldEagerType = (!isGroupChat || wasMentioned) && !isHeartbeat;
|
||||
const shouldInjectGroupIntro = Boolean(
|
||||
isGroupChat &&
|
||||
(isFirstTurnInSession || sessionEntry?.groupActivationNeedsSystemIntro),
|
||||
|
||||
Reference in New Issue
Block a user