← Back to PRs

#22844: feat(line): add push-only deliveryMode

by loiie45e open 2026-02-21 18:54 View on GitHub →
channel: line size: S
### What Add `channels.line.deliveryMode` config option ("auto" | "push"). - `auto` (default): current behavior (reply token when possible, fallback to push) - `push`: disable reply-token usage and always push (reduces failures due to reply token expiry / queued delays) Also ensure push target uses raw `ctx.userId` when available to avoid LINE push 404 caused by prefixed addresses. ### Tests - Add unit test to ensure when `replyToken` is undefined, `deliverLineAutoReply` never calls `replyMessageLine` and uses push path. ### Why Improve reliability on LINE where reply tokens expire quickly (~1 minute) and long/queued agent work can cause reply failures. <!-- greptile_comment --> <h3>Greptile Summary</h3> Adds configurable `deliveryMode` option for LINE channel to support push-only delivery, avoiding reply token expiry issues. When set to `"push"`, the system bypasses reply tokens entirely and uses push API for all messages. The change correctly uses raw `userId` for push targets (avoiding the `line:` prefix that exists in `ctxPayload.From`), includes proper error handling for push-only mode, and adds test coverage for the new behavior. <h3>Confidence Score: 5/5</h3> - Safe to merge - well-implemented feature with proper defaults and test coverage - The implementation is clean, maintains backward compatibility with `"auto"` as the default, includes comprehensive test coverage, and follows the repository's existing patterns. The logic correctly differentiates between reply token and push delivery paths. - No files require special attention <sub>Last reviewed commit: 1fecf20</sub> <!-- greptile_other_comments_section --> <sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs