diff --git a/.claude/skills/add-voice-transcription/modify/src/channels/whatsapp.ts b/.claude/skills/add-voice-transcription/modify/src/channels/whatsapp.ts index 0781185..025e905 100644 --- a/.claude/skills/add-voice-transcription/modify/src/channels/whatsapp.ts +++ b/.claude/skills/add-voice-transcription/modify/src/channels/whatsapp.ts @@ -20,6 +20,7 @@ import { import { logger } from '../logger.js'; import { isVoiceMessage, transcribeAudioMessage } from '../transcription.js'; import { Channel, OnInboundMessage, OnChatMetadata, RegisteredGroup } from '../types.js'; +import { registerChannel, ChannelOpts } from './registry.js'; const GROUP_SYNC_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24 hours @@ -354,3 +355,12 @@ export class WhatsAppChannel implements Channel { } } } + +registerChannel('whatsapp', (opts: ChannelOpts) => { + const authDir = path.join(STORE_DIR, 'auth'); + if (!fs.existsSync(path.join(authDir, 'creds.json'))) { + logger.warn('WhatsApp: credentials not found. Run /add-whatsapp to authenticate.'); + return null; + } + return new WhatsAppChannel(opts); +});