Channel Discovery:
- Remove channel/supergroup filter from getAccountChats — all chat types
(private, groups, Saved Messages, etc.) are now discoverable as sources
- Detect and label the self-chat as "Saved Messages" via getMe
- Update channel picker dialog to accept any chat type string
Bot Rich Messages:
- Enhance package send preview with creator, file count, tags, and source
channel info in MarkdownV2 caption
- Include tags in new_package subscription notifications
- Expand getPendingSendRequest to fetch richer package data
Performance:
- Reviewed pipeline for many-channel load — getChats pagination fix and
per-channel getChat pre-load from prior commit address the main concerns
- Channels with no new messages skip in 2-3 API calls
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
forwardMessages with send_copy is unreliable for bot accounts — it
queues an internal download+reupload that can silently fail.
New approach:
1. getMessage to get the file's remote ID from the dest channel
2. sendMessage with inputMessageDocument + inputFileRemote to send
directly to the user (no re-upload needed, file is already on
Telegram's servers)
3. waitForSendConfirmation to actually verify delivery via
updateMessageSendSucceeded/Failed
Also removed getChats call (not available to bot accounts).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The bot may not have the source channel loaded in TDLib's internal
state. Calling getChat first ensures it's resolved. Also added result
logging to diagnose silent send failures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
send_copy requires re-uploading which may silently fail for bots.
Regular forward is more reliable. Added logging to debug delivery.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without getChats after login, TDLib doesn't know about the destination
channel and forwardMessages fails with "Chat not found".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace 0n literals with BigInt(0) for ES2017 target compatibility
- Parse link code JSON to extract userId and check expiration (was
passing raw JSON string as FK, causing constraint violation)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>