Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Discern albums and images via iter_messages

I iterate throw messages via:

async for message in client.iter_messages(source_name, offset_date=offset_date, reverse=True):

But it doesn't matter if I got album or some images separately. Anyways, it will be different messages. I need to discern albums and images. How to do this?

like image 448
kmekhovich Avatar asked Nov 02 '25 02:11

kmekhovich


1 Answers

If message.grouped_id is present, it is a unique number the same for all photos within a single album. If its None, the message is not in an album.

like image 55
Hack5 Avatar answered Nov 04 '25 19:11

Hack5



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!