#16812: Fix sessions_send failing on Telegram, Discord, Signal, and Slack
channel: discord
channel: signal
channel: slack
channel: telegram
stale
size: XS
trusted-contributor
Cluster:
Network Error Handling Improvements
Cross-channel `sessions_send` silently fails on these four channels because `resolveAnnounceTarget` skips the session lookup when `preferSessionLookupForAnnounceTarget` isn't set. It falls back to parsing the session key string, which gives the channel API a malformed target ID.
WhatsApp already had this flag. LINE was fixed separately (#8539). These four were just missed.
One-liner per plugin — just adding `preferSessionLookupForAnnounceTarget: true` to each channel's meta config.
Fixes #16660
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes `sessions_send` silently failing on Telegram, Discord, Signal, and Slack by enabling session lookup for announce targets. Without `preferSessionLookupForAnnounceTarget`, the `resolveAnnounceTarget` function skips querying the gateway's session list and instead parses the session key string directly, which produces malformed target IDs for these channels. WhatsApp already had this flag set, and this PR brings the other four channels into alignment.
- Added `preferSessionLookupForAnnounceTarget: true` to Discord channel meta config
- Added `preferSessionLookupForAnnounceTarget: true` to Signal channel meta config
- Added `preferSessionLookupForAnnounceTarget: true` to Slack channel meta config
- Added `preferSessionLookupForAnnounceTarget: true` to Telegram channel meta config
- Added test coverage for Telegram to verify the flag is enabled
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The changes are minimal, well-understood, and follow the exact pattern already used by WhatsApp. Each change is a one-line addition of a boolean flag to channel metadata. The fix addresses a clear bug where session announcements were failing, and test coverage was added for Telegram. The pattern in `sessions-announce-target.ts:18` shows this flag is explicitly checked to determine whether to perform session lookup vs string parsing.
- No files require special attention
<sub>Last reviewed commit: d1a8e3f</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#14912: fix(slack): enable session-store lookup for announce target accountId
by mcaxtr · 2026-02-12
83.0%
#16830: fix: session lookup default
by Limitless2023 · 2026-02-15
81.5%
#22469: fix(gateway): avoid stale whatsapp labels on direct sessions
by loganprit · 2026-02-21
77.2%
#23727: Fix Telegram channel resolution drift across announce + message sen...
by SmithLabsLLC · 2026-02-22
76.3%
#16061: fix(sessions): tolerate invalid sessionFile metadata
by haoyifan · 2026-02-14
76.1%
#6850: fix: support direct channel:account:peer format in session key extr...
by toboto · 2026-02-02
75.7%
#23238: fix(telegram): account named "default" silently breaks inbound polling
by anillBhoi · 2026-02-22
75.5%
#20204: fix(sessions): allow negative IDs and colon separators in session IDs
by zerone0x · 2026-02-18
75.3%
#14795: fix: skip disabled channel plugins in cross-context messaging checks
by explainanalyze · 2026-02-12
75.0%
#17527: fix(gateway): allow WebChat to attach to main session regardless of...
by Glucksberg · 2026-02-15
74.6%