fix: wire per-account dm scope guidance (#3095) (thanks @jarvis-sam)

This commit is contained in:
Ayaan Zaidi
2026-01-28 11:41:28 +05:30
committed by Ayaan Zaidi
parent d499b14842
commit b6a3a91edf
10 changed files with 17 additions and 10 deletions

View File

@@ -54,11 +54,13 @@ export async function maybeBroadcastMessage(params: {
sessionKey: buildAgentSessionKey({
agentId: normalizedAgentId,
channel: "whatsapp",
accountId: params.route.accountId,
peer: {
kind: params.msg.chatType === "group" ? "group" : "dm",
id: params.peerId,
},
dmScope: params.cfg.session?.dmScope,
identityLinks: params.cfg.session?.identityLinks,
}),
mainSessionKey: buildAgentMainSessionKey({
agentId: normalizedAgentId,