Skip to content

Commit f0e9017

Browse files
Petrus PennanenPetrus Pennanen
authored andcommitted
fix: resolve critical room-poller crash by supporting legacy string rooms and env API keys
1 parent f943e4a commit f0e9017

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bin/cli.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,9 @@ async function main() {
309309
}
310310

311311
if (subcommand === 'watch') {
312-
const pollerRooms = config?.poller?.rooms;
313-
const pollerApiKey = config?.poller?.api_key;
312+
const rawRooms = config?.poller?.rooms;
313+
const pollerRooms = Array.isArray(rawRooms) ? rawRooms : (typeof rawRooms === 'string' ? rawRooms.split(',').map(s=>s.trim()) : null);
314+
const pollerApiKey = config?.poller?.api_key || config?.poller?.apiKey || config?.intent?.apiKey || process.env.ANTIGRAVITY_API_KEY;
314315
const pollerHandle = config?.poller?.handle;
315316
if (!pollerRooms || !pollerApiKey || !pollerHandle) {
316317
console.error('Error: poller.rooms, poller.api_key, and poller.handle must be set in config');

0 commit comments

Comments
 (0)