feat(channels): add bluebubbles imessage adapter
This commit is contained in:
+15
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user