fix: harden message hook session/group context and add integration coverage (#9859) (thanks @Drickon)

This commit is contained in:
Peter Steinberger
2026-03-02 22:34:27 +00:00
parent b5102ba4f9
commit 29dde80c3e
9 changed files with 310 additions and 46 deletions

View File

@@ -627,6 +627,8 @@ describe("deliverOutboundPayloads", () => {
const { sendWhatsApp } = await runChunkedWhatsAppDelivery({
mirror: {
sessionKey: "agent:main:main",
isGroup: true,
groupId: "whatsapp:group:123",
},
});
expect(sendWhatsApp).toHaveBeenCalledTimes(2);
@@ -643,6 +645,8 @@ describe("deliverOutboundPayloads", () => {
channelId: "whatsapp",
conversationId: "+1555",
messageId: "w2",
isGroup: true,
groupId: "whatsapp:group:123",
}),
);
expect(internalHookMocks.triggerInternalHook).toHaveBeenCalledTimes(1);