Skip to content

feat: add LINE messaging channel support#577

Draft
hazeone wants to merge 1 commit intomainfrom
cursor/line-channel-b338
Draft

feat: add LINE messaging channel support#577
hazeone wants to merge 1 commit intomainfrom
cursor/line-channel-b338

Conversation

@hazeone
Copy link
Copy Markdown
Contributor

@hazeone hazeone commented Mar 18, 2026

Summary

Adds full LINE messaging channel support to the Channels page, placed last in the supported channels grid (after QQ Bot). LINE uses the LINE Messaging API with Channel Access Token and Channel Secret for authentication.

Changes across 7 files:

Frontend (renderer)

  • src/types/channel.ts — Added 'line' to getPrimaryChannels() so it appears in the Supported Channels grid
  • src/assets/channels/line.svg — New LINE SVG logo icon (official LINE chat bubble mark)
  • src/pages/Channels/index.tsx — Added LINE icon import and case 'line': to ChannelLogo
  • src/components/channels/ChannelConfigModal.tsx — Added LINE icon import and case 'line': to modal ChannelLogo

Backend (main process)

  • electron/utils/channel-config.ts — Added LINE to ensurePluginAllowlist, added validateLineCredentials (calls api.line.me/v2/bot/info), and LINE-specific config validation in validateChannelConfig
  • electron/utils/plugin-install.ts — Added ensureLinePluginInstalled and registered it in ALL_BUNDLED_PLUGINS
  • electron/api/routes/channels.ts — Added LINE plugin install check in POST /api/channels/config (soft warning if plugin not found locally, config still saves)

Notes

  • LINE type definition, CHANNEL_META, CHANNEL_ICONS, CHANNEL_NAMES, CHANNEL_UNIQUE_CREDENTIAL_KEY, and i18n strings (en/zh/ja) were already present in the codebase — this PR wires them into the UI and backend logic.
  • LINE plugin install uses a soft-warning approach (unlike DingTalk/WeCom/Feishu/QQBot which hard-fail), since the LINE extension may be installed externally via the OpenClaw CLI.

Related Issue(s)

N/A

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other

Validation

  • pnpm run typecheck — passes
  • pnpm run lint — passes
  • pnpm test — all 250 tests pass (47 test files)
  • Manual GUI testing: verified LINE appears in the Supported Channels grid with proper icon, configuration modal renders correct fields (Channel Access Token, Channel Secret), Validate Configuration button present, form validation works

Checklist

  • I ran relevant checks/tests locally.
  • I updated docs if behavior or interfaces changed.
  • I verified there are no unrelated changes in this PR.
Open in Web Open in Cursor 

- Add 'line' to getPrimaryChannels() so it appears in the Supported Channels grid
- Add LINE SVG logo icon (src/assets/channels/line.svg)
- Add LINE logo case to ChannelLogo in both Channels page and ChannelConfigModal
- Add LINE to ensurePluginAllowlist (plugins.allow + plugins.enabled)
- Add validateLineCredentials via LINE Messaging API /v2/bot/info
- Add LINE-specific config validation in validateChannelConfig
- Add ensureLinePluginInstalled and register in ALL_BUNDLED_PLUGINS
- Add LINE plugin install check in POST /api/channels/config route (soft warning)

Co-authored-by: Haze <hazeone@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants