Discern albums and images via iter_messages

Viewed 98

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?

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.

Related