Skip to content

feat(channels): add LINE Official Account channel support#147

Merged
yinwm merged 4 commits intosipeed:mainfrom
ex-takashima:feat/line-channel
Feb 14, 2026
Merged

feat(channels): add LINE Official Account channel support#147
yinwm merged 4 commits intosipeed:mainfrom
ex-takashima:feat/line-channel

Conversation

@ex-takashima
Copy link
Contributor

Summary

  • Add LINE Official Account (LINE Messaging API) as the 9th messaging channel using HTTP Webhook
  • Support text, image, and audio messages with bidirectional communication
  • HMAC-SHA256 webhook signature verification for security
  • Reply Token (free) with Push API fallback for sending messages
  • Group chat support: respond only when @mentioned, quote original message in replies
  • Loading animation while processing messages
  • No external SDK required (standard library only)

Files Changed

  • pkg/channels/line.go — Full LINE channel implementation (webhook server, signature verification, mention detection, quote support, loading animation)
  • pkg/config/config.go — Add LINEConfig struct with channel_secret, channel_access_token, webhook settings
  • pkg/channels/manager.go — Register LINE channel in initChannels()
  • config/config.example.json — Add LINE config section
  • .env.example — Add LINE environment variables

Configuration

{
  "channels": {
    "line": {
      "enabled": true,
      "channel_secret": "YOUR_CHANNEL_SECRET",
      "channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
      "webhook_host": "0.0.0.0",
      "webhook_port": 18791,
      "webhook_path": "/webhook/line",
      "allow_from": []
    }
  }
}

LINE Setup

  1. Create a LINE Official Account and Messaging API channel at LINE Developers Console
  2. Get Channel Secret and Channel Access Token
  3. Set Webhook URL to https://your-domain:18791/webhook/line (HTTPS required — use reverse proxy or tunnel)
  4. Enable "Use webhook" in the console

Test plan

  • go build ./... compiles cleanly
  • Manual test with LINE Official Account

Closes #146

🤖 Generated with Claude Code

ex-takashima and others added 4 commits February 14, 2026 10:01
Add LINE Messaging API as the 9th messaging channel using HTTP Webhook.
Supports text/image/audio messages, group chat @mention detection,
reply with quote, and loading animation.

- No external SDK required (standard library only)
- HMAC-SHA256 webhook signature verification
- Reply Token (free) with Push API fallback
- Group chat: respond only when @mentioned
- Quote original message in replies using quoteToken

Closes sipeed#146

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge upstream changes (HeartbeatConfig addition) alongside LINEConfig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix web_test.go and config_test.go to use current function signatures
after merging upstream changes (WebSearchToolOptions, BraveConfig).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yinwm
Copy link
Collaborator

yinwm commented Feb 14, 2026

test failed, please fix them , thanks @ex-takashima

@ex-takashima
Copy link
Contributor Author

@yinwm Thanks for the review! I've already fixed the test failures in the latest commit (6463796).

The test issues were caused by upstream API signature changes (NewWebSearchTool and WebToolsConfig) that came in during the merge — not related to the LINE implementation itself.

Could you approve the CI workflow run so the checks can execute? Since this is my first contribution, the workflow requires maintainer approval. Thank you!

@yinwm yinwm merged commit 5872e0f into sipeed:main Feb 14, 2026
3 checks passed
@yinwm
Copy link
Collaborator

yinwm commented Feb 14, 2026

thanks for the pr

emadomedher pushed a commit to emadomedher/picoclaw that referenced this pull request Feb 17, 2026
feat(channels): add LINE Official Account channel support
StarWindv referenced this pull request in StarWindv/PicoClaw-shou Feb 19, 2026
feat(channels): add LINE Official Account channel support
@ex-takashima ex-takashima deleted the feat/line-channel branch March 4, 2026 14:36
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.

feat: Add LINE Official Account channel support

2 participants