natanimn / Telebof

Easy and modern Java Telegram Bot API
GNU General Public License v3.0
13 stars 4 forks source link

Fix getting user profile photos #2

Open Mike-Flagin opened 2 months ago

Mike-Flagin commented 2 months ago

In Telegram API type UserProfilePhotos has field photos which is Array of Array of PhotoSize(https://core.telegram.org/bots/api#userprofilephotos). Your Java class UserProfilePhotos field photos has type List<PhotoSize>, so when you get response from Telegram API there is an error of parsing JSON. I have changed type of the field photos to List<List<PhotoSize>>, which solved the problem.