mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 03:28:29 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -20,7 +20,9 @@ type BlueBubblesProbeResult = {
|
||||
function readBlueBubblesAccountStatus(
|
||||
value: ChannelAccountSnapshot,
|
||||
): BlueBubblesAccountStatus | null {
|
||||
if (!isRecord(value)) return null;
|
||||
if (!isRecord(value)) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
accountId: value.accountId,
|
||||
enabled: value.enabled,
|
||||
@@ -33,7 +35,9 @@ function readBlueBubblesAccountStatus(
|
||||
}
|
||||
|
||||
function readBlueBubblesProbeResult(value: unknown): BlueBubblesProbeResult | null {
|
||||
if (!isRecord(value)) return null;
|
||||
if (!isRecord(value)) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
ok: typeof value.ok === "boolean" ? value.ok : undefined,
|
||||
status: typeof value.status === "number" ? value.status : null,
|
||||
@@ -47,10 +51,14 @@ export function collectBlueBubblesStatusIssues(
|
||||
const issues: ChannelStatusIssue[] = [];
|
||||
for (const entry of accounts) {
|
||||
const account = readBlueBubblesAccountStatus(entry);
|
||||
if (!account) continue;
|
||||
if (!account) {
|
||||
continue;
|
||||
}
|
||||
const accountId = asString(account.accountId) ?? "default";
|
||||
const enabled = account.enabled !== false;
|
||||
if (!enabled) continue;
|
||||
if (!enabled) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const configured = account.configured === true;
|
||||
const running = account.running === true;
|
||||
|
||||
Reference in New Issue
Block a user