patch 40a72fbbea1b081086b4743201fffcb71e513e5f
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sun Jan 30 02:28:02 CET 2022
* telegram: Add size info to photo (media)
diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py
--- old-irgramd/telegram.py 2024-11-23 02:09:35.368733957 +0100
+++ new-irgramd/telegram.py 2024-11-23 02:09:35.368733957 +0100
@@ -320,7 +320,9 @@
else:
caption = ''
- elif message.photo: media_type = 'photo'
+ elif message.photo:
+ size = [x for x in message.media.photo.sizes if x.type == 'x'][0]
+ media_type = 'photo:{}x{}'.format(size.w, size.h)
elif message.audio: media_type = 'audio'
elif message.voice: media_type = 'rec'
elif message.video: media_type = 'video'