feat: add group activation command

This commit is contained in:
Peter Steinberger
2025-12-22 20:36:29 +01:00
parent 5d2d701e1e
commit f10c8f2b4c
13 changed files with 356 additions and 47 deletions

View File

@@ -1441,9 +1441,18 @@ describe("web auto-reply", () => {
.mockResolvedValueOnce({ text: SILENT_REPLY_TOKEN })
.mockResolvedValueOnce({ text: "ok" });
const { storePath, cleanup } = await makeSessionStore({
"group:123@g.us": {
sessionId: "g-1",
updatedAt: Date.now(),
groupActivation: "always",
},
});
setLoadConfigMock(() => ({
inbound: {
groupChat: { activation: "always", mentionPatterns: ["@clawd"] },
groupChat: { mentionPatterns: ["@clawd"] },
session: { store: storePath },
},
}));
@@ -1504,6 +1513,7 @@ describe("web auto-reply", () => {
expect(payload.Body).toContain("Bob: second");
expect(reply).toHaveBeenCalledTimes(1);
await cleanup();
resetLoadConfigMock();
});