1.5 KiB
1.5 KiB
Zalo Channel Adapter Checklist
Date: 2026-02-16
Scope: Implement Zalo adapter to close the remaining channel gap in the LINE/Feishu/Zalo set.
Goal
Add a Zalo OA channel adapter with webhook ingress, outbound send path, mention/allowlist gating, and runtime wiring through daemon + gateway.
Implemented
- Added Zalo adapter:
src/channels/zalo/adapter.tssrc/channels/zalo/index.ts
- Inbound webhook handling:
- endpoint:
POST /zalo/events - optional webhook token validation (
x-zalo-tokenheader or payload token)
- endpoint:
- Message normalization:
- sender/message extraction and normalized
InboundMessageemission - mention gating (
require_mention,mention_name) - optional user allowlist (
allowed_user_ids)
- sender/message extraction and normalized
- Outbound send:
- OA CS text message API call with
oa_access_token
- OA CS text message API call with
- Runtime integration:
- config schema for
zaloblock - daemon registration + gateway handler binding
- service discovery listing
- config schema for
Tests
src/channels/zalo/adapter.test.ts- name/status
- outbound send path
- inbound normalization
- webhook token enforcement
- mention gating behavior
src/daemon/channels.test.ts- adapter registration + gateway
setZaloHandlerwiring
- adapter registration + gateway
src/config/schema.test.ts- zalo config parse/defaults
src/gateway/handlers/services.test.tszaloservice visibility
Validation Run
pnpm test:run src/channels/zalo/adapter.test.ts src/daemon/channels.test.ts src/config/schema.test.ts src/gateway/handlers/services.test.ts
pnpm typecheck
pnpm build