Adds Account model (platform, jid, sessionPath, displayName, status) with
AccountStatus enum (ACTIVE/DISCONNECTED/BANNED) and optional accountId FK
on Group for multi-account WhatsApp session tracking.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Wrap groupFetchAllParticipating in try/catch to prevent unhandled rejection on connect
- Catch errors from async onMessage/onGroups callbacks via Promise.resolve().catch
- Return null from normalizer when key.id is missing (prevents empty upsert key collision)
- Extract parseRedisUrl to redis-connection.ts to eliminate duplication
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Idempotent message persistence via prisma.message.upsert. Uses URL parsing
to pass connection options to BullMQ, avoiding ioredis version conflicts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds packageManager field to root package.json (required by turbo v2.9),
loads .env via dotenv in API jest config so Prisma integration tests find
DATABASE_URL when run from the monorepo root. pnpm build + pnpm test: 8/8 passing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds apps/worker with TypeScript config, BullMQ/ioredis dependencies,
pino logger bootstrap, and a smoke test. Queue consumers wired in later phases.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>