patch 497bfd6efd884d00e2d958e9ad8ac0b4009ad780
Author: E. Bosch <presidev@AT@gmail.com>
Date: Fri Feb 4 22:08:05 CET 2022
* telegram: Fix size info of photo media
hunk ./telegram.py 326
- size = [x for x in message.media.photo.sizes if x.type == 'x'][0]
- media_type = 'photo:{}x{}'.format(size.w, size.h)
+ size = message.media.photo.sizes[-1]
+ if hasattr(size, 'w') and hasattr(size, 'h'):
+ media_type = 'photo:{}x{}'.format(size.w, size.h)
+ else:
+ media_type = 'photo'