feat(channels): add bluebubbles imessage adapter

This commit is contained in:
William Valentin
2026-02-16 09:41:26 -08:00
parent 2cadff901d
commit 8e9f9aa4de
13 changed files with 409 additions and 2 deletions
+15 -1
View File
@@ -1,6 +1,6 @@
import type { Config } from '../config/index.js';
import type { HookEngine } from '../hooks/index.js';
import { ChannelRegistry, TelegramAdapter, WebChatAdapter, DiscordAdapter, SlackAdapter, WhatsAppAdapter, MatrixAdapter, SignalAdapter, TeamsAdapter, GoogleChatAdapter, PairingManager } from '../channels/index.js';
import { ChannelRegistry, TelegramAdapter, WebChatAdapter, DiscordAdapter, SlackAdapter, WhatsAppAdapter, MatrixAdapter, SignalAdapter, TeamsAdapter, GoogleChatAdapter, BlueBubblesAdapter, PairingManager } from '../channels/index.js';
import { CronScheduler, WebhookHandler, GmailWatcher } from '../automation/index.js';
import type { GatewayServer } from '../gateway/index.js';
@@ -126,6 +126,20 @@ export function registerChannels(deps: ChannelsDeps): ChannelsResult {
gateway.setGoogleChatHandler(googleChatAdapter);
}
// Register BlueBubbles adapter (if configured)
if (config.bluebubbles) {
const blueBubblesAdapter = new BlueBubblesAdapter({
endpoint: config.bluebubbles.endpoint,
apiKey: config.bluebubbles.api_key,
webhookToken: config.bluebubbles.webhook_token,
allowedChatGuids: config.bluebubbles.allowed_chat_guids.length > 0 ? config.bluebubbles.allowed_chat_guids : undefined,
requireMention: config.bluebubbles.require_mention,
mentionName: config.bluebubbles.mention_name,
});
channelRegistry.register(blueBubblesAdapter);
gateway.setBlueBubblesHandler(blueBubblesAdapter);
}
// Register WebChat adapter (wraps the gateway)
const webChatAdapter = new WebChatAdapter({ gateway });
channelRegistry.register(webChatAdapter);