Step 4 (Needs Review)

This commit is contained in:
Tyler Yust
2026-01-19 18:50:22 -08:00
committed by Peter Steinberger
parent 7870ce8177
commit 2cf444be02
5 changed files with 279 additions and 41 deletions

View File

@@ -5,6 +5,7 @@ import type { ChannelAccountSnapshot, ChannelPlugin, ClawdbotConfig } from "claw
import {
applyAccountNameToChannelSection,
buildChannelConfigSchema,
collectBlueBubblesStatusIssues,
DEFAULT_ACCOUNT_ID,
deleteAccountFromConfigSection,
formatPairingApproveHint,
@@ -331,19 +332,7 @@ export const bluebubblesPlugin: ChannelPlugin<ResolvedBlueBubblesAccount> = {
lastStopAt: null,
lastError: null,
},
collectStatusIssues: (accounts) =>
accounts.flatMap((account) => {
const lastError = typeof account.lastError === "string" ? account.lastError.trim() : "";
if (!lastError) return [];
return [
{
channel: "bluebubbles",
accountId: account.accountId,
kind: "runtime",
message: `Channel error: ${lastError}`,
},
];
}),
collectStatusIssues: collectBlueBubblesStatusIssues,
buildChannelSummary: ({ snapshot }) => ({
configured: snapshot.configured ?? false,
baseUrl: snapshot.baseUrl ?? null,