mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 11:01:24 +00:00
feat(status): improve status output
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
listIMessageAccountIds,
|
||||
resolveIMessageAccount,
|
||||
} from "../imessage/accounts.js";
|
||||
import { resolveMSTeamsCredentials } from "../msteams/token.js";
|
||||
import { DEFAULT_ACCOUNT_ID } from "../routing/session-key.js";
|
||||
import {
|
||||
listSignalAccountIds,
|
||||
@@ -297,6 +298,27 @@ export async function buildProviderSummary(
|
||||
}
|
||||
}
|
||||
|
||||
const msEnabled = effective.msteams?.enabled !== false;
|
||||
if (!msEnabled) {
|
||||
lines.push(tint("MS Teams: disabled", theme.muted));
|
||||
} else {
|
||||
const configured = Boolean(resolveMSTeamsCredentials(effective.msteams));
|
||||
lines.push(
|
||||
configured
|
||||
? tint("MS Teams: configured", theme.success)
|
||||
: tint("MS Teams: not configured", theme.muted),
|
||||
);
|
||||
if (configured && resolved.includeAllowFrom) {
|
||||
const allowFrom = (effective.msteams?.allowFrom ?? [])
|
||||
.map((val) => val.trim())
|
||||
.filter(Boolean)
|
||||
.slice(0, 2);
|
||||
if (allowFrom.length > 0) {
|
||||
lines.push(accountLine("default", [`allow:${allowFrom.join(",")}`]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user