[TelegramBridge] Getting posts beyond last page
Fixes https://github.com/RSS-Bridge/rss-bridge/issues/2084.
Bridge can now fetch previous posts beyond ones displayed on default webpage. This is pretty much a necessity for news aggregator channels with dozens of posts/day.
As the number of posts on a telegram webpage is not constant (I was getting anything from 4 to 20 posts for different channels), the bridge now fetches webpages with "...?before=..." param until post count matches requested number of posts OR the number of fetched pages reaches the hard-limit OR reaching the first post in the channel.
Although I tested the code manually on different channels, I'm very much an amateur programmer and moreover never wrote in PHP before. So sanity-checks would be nice.
Pull request artifacts
| Bridge | Context | Status |
|---|---|---|
| Telegram | 1 untitled (current) | ✔️ |
| Telegram | 1 untitled (pr) | ✔️ |
last change: Monday 2024-01-08 12:43:03
@VerifiedJoseph
the bridge is improved but the code is confusing to me.
linter upgrade disallows sizeof function.
i agree with @em92 this leads to extra requests to telegram servers. might be problematic