mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-09 05:19:32 +08:00
fix(line): resolve TypeError in status command
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
LineConfigSchema,
|
||||
processLineMessage,
|
||||
type ChannelPlugin,
|
||||
type ChannelStatusIssue,
|
||||
type OpenClawConfig,
|
||||
type LineConfig,
|
||||
type LineChannelData,
|
||||
@@ -560,19 +561,26 @@ export const linePlugin: ChannelPlugin<ResolvedLineAccount> = {
|
||||
lastStopAt: null,
|
||||
lastError: null,
|
||||
},
|
||||
collectStatusIssues: ({ account }) => {
|
||||
const issues: Array<{ level: "error" | "warning"; message: string }> = [];
|
||||
if (!account.channelAccessToken?.trim()) {
|
||||
issues.push({
|
||||
level: "error",
|
||||
message: "LINE channel access token not configured",
|
||||
});
|
||||
}
|
||||
if (!account.channelSecret?.trim()) {
|
||||
issues.push({
|
||||
level: "error",
|
||||
message: "LINE channel secret not configured",
|
||||
});
|
||||
collectStatusIssues: (accounts) => {
|
||||
const issues: ChannelStatusIssue[] = [];
|
||||
for (const account of accounts) {
|
||||
const accountId = account.accountId ?? DEFAULT_ACCOUNT_ID;
|
||||
if (!account.channelAccessToken?.trim()) {
|
||||
issues.push({
|
||||
channel: "line",
|
||||
accountId,
|
||||
kind: "config",
|
||||
message: "LINE channel access token not configured",
|
||||
});
|
||||
}
|
||||
if (!account.channelSecret?.trim()) {
|
||||
issues.push({
|
||||
channel: "line",
|
||||
accountId,
|
||||
kind: "config",
|
||||
message: "LINE channel secret not configured",
|
||||
});
|
||||
}
|
||||
}
|
||||
return issues;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user