← Back to PRs

#10487: fix(line): use snapshot configured flag in collectStatusIssues

by mcaxtr open 2026-02-06 15:31 View on GitHub →
channel: line size: S trusted-contributor experienced-contributor
## Summary Fixes #10428 `openclaw doctor` always shows false "LINE channel access token not configured" and "LINE channel secret not configured" warnings even when LINE is correctly configured via `tokenFile`/`secretFile` and functioning normally. **Root Cause:** `collectStatusIssues` receives `ChannelAccountSnapshot[]` objects (not raw account objects). The LINE implementation was reading `account.channelAccessToken` and `account.channelSecret` directly — but these fields don't exist on `ChannelAccountSnapshot`. Since the snapshot never contains raw credentials (by design), the optional chaining always returns `undefined`, causing the warning to fire unconditionally. **Fix:** Use `account.configured` (the snapshot boolean) instead of raw credential fields, matching other channel plugins (Tlon, Google Chat, etc.). Also updated `isConfigured` and `describeAccount.configured` to check both `channelAccessToken` and `channelSecret` for consistency with `buildAccountSnapshot`. ## Tests All 8 new tests fail before, pass after: - `collectStatusIssues` and `buildAccountSnapshot` coverage for configured/unconfigured/mixed accounts - `isConfigured` and `describeAccount` consistency ``` pnpm build ✅ pnpm check ✅ pnpm test ✅ ```

Most Similar PRs