When downloading large files via Telegram, if the stream stalls mid-download
(e.g. no Content-Length header, network congestion), the polling loop hangs
indefinitely since reader.read() has no timeout.
Changes:
- Add timeoutMs option to fetchRemoteMedia, passed through to fetchWithSsrFGuard
- Add per-chunk timeout (30s default) to readResponseWithLimit via Promise.race
- Set 30s download timeout for Telegram media fetches
This ensures stalled downloads are aborted and the polling loop continues
processing subsequent messages.
Fixes#40074