Add Zalo channel adapter with webhook and send path

This commit is contained in:
William Valentin
2026-02-16 13:11:51 -08:00
parent 891ccb696e
commit 8bed99c770
16 changed files with 491 additions and 6 deletions
+25
View File
@@ -635,6 +635,31 @@ describe('configSchema — feishu', () => {
});
});
describe('configSchema — zalo', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
models: { default: { provider: 'anthropic', model: 'claude-3' } },
};
it('accepts zalo config and defaults optional fields', () => {
const result = configSchema.parse({
...minimalConfig,
zalo: {
oa_access_token: 'oa-token',
},
});
expect(result.zalo).toBeDefined();
if (!result.zalo) {
throw new Error('Expected zalo config');
}
expect(result.zalo.oa_access_token).toBe('oa-token');
expect(result.zalo.allowed_user_ids).toEqual([]);
expect(result.zalo.require_mention).toBe(true);
expect(result.zalo.mention_name).toBe('flynn');
});
});
describe('configSchema — whatsapp', () => {
const minimalConfig = {
telegram: { bot_token: 'test', allowed_chat_ids: [1] },