Commit 2e1bfc3
committed
fix(delete_profile_photo): pass Photo object instead of int to DeletePhotosRequest
Telethon's DeletePhotosRequest requires InputPhoto objects, which it derives
from Photo objects via get_input_photo(). Passing photo.id (an int) causes:
AttributeError: 'int' object has no attribute 'SUBCLASS_OF_ID'
TypeError: Cannot cast int to any kind of InputPhoto.
Fix: pass the Photo object directly (photos.photos[0]) so Telethon can
convert it to InputPhoto internally.1 parent 8c4b671 commit 2e1bfc3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2178 | 2178 | | |
2179 | 2179 | | |
2180 | 2180 | | |
2181 | | - | |
| 2181 | + | |
2182 | 2182 | | |
2183 | 2183 | | |
2184 | 2184 | | |
| |||
0 commit comments