xtrime-ru / TelegramRSS

Convert telegram posts to RSS or json in amphp server
https://tg.i-c-a.su
MIT License
229 stars 40 forks source link

How do I join media files in one message in json? #17

Closed BANOnotIT closed 1 year ago

BANOnotIT commented 1 year ago

Right now when a group published a gallery of photos such as this one json representation creates a new entry for every photo in main feed. I couldn't find any way to join them back in one post. Is there any field like "parent post id" or smth?

xtrime-ru commented 1 year ago

The property you looking for is called "grouped_id" in telegram.

See how grouping implemented in RSS: https://github.com/search?q=repo%3Axtrime-ru%2FTelegramRSS+grouped_id&type=code

BANOnotIT commented 1 year ago

Thanks. I also want to ask if this media are pushed to the feed instantaneously or there is and edge case when some media files can be not yet loaded to be present in the feed but other are already there?

xtrime-ru commented 1 year ago

All files are streamed directly from telegram media DC (datacenters) on each request. Client caches nothing except metadata. Its used to access media on telegram DC.