INNER CODE UNIT · TypeScript
camelKey
Beever-AI/beever-atlas · bot/src/index.ts:658
const camelKey = key.replace(/_([a-z])/g, (_: string, c: string) => c.toUpperCase());
normalizedCreds[camelKey] = String(value);
}
console.log(`${label}: registering ${conn.platform} adapter (connection: ${conn.connection_id || "legacy"})`);
await chatManager.register(conn.platform, normalizedCreds, conn.connection_id);
// Hydrate the in-memory Teams team-id Map from the durable Mongo record
// so the first `listChannels` call after a bot restart (or Redis cache
// wipe) returns the workspace's channels without needing an inbound
// webhook to reseed identity. This is the parity path with Slack/
// Discord/Mattermost (whose tokens already live in Mongo).
if (conn.platform === "teams" && conn.connection_id && conn.teams_known_team_ids?.length) {
seedTeamsKnownTeamIds(conn.connection_id, conn.teams_known_team_ids);
console.log(
`${label}: seeded ${conn.teams_known_team_ids.length} known team id(s) for Teams connection ${conn.connection_id}`,
);
}
}