It turns out we were writing our database in a wrong way. When I send a photo, Telegram will usually send to bot a message with several PhotoSize objects of different sizes. All of them were written to the database, which I don't think is required.
Instead, we should deduplicate the PhotoSize objects based on the FileUniqueId, but there's another problem: Funogram version we use doesn't provide the access to this field at all.
So, I had to update Funogram and change quite a lot of code in our tests to make it work.
The above isn't true and FileUniqueId turned out to not be useful for this use case. Anyway, I've decided to update Funogram.
Closes #147.
It turns out we were writing our database in a wrong way. When I send a photo, Telegram will usually send to bot a message with several
PhotoSize
objects of different sizes. All of them were written to the database, which I don't think is required.Instead, we should deduplicate thePhotoSize
objects based on theFileUniqueId
, but there's another problem: Funogram version we use doesn't provide the access to this field at all.So, I had to update Funogram and change quite a lot of code in our tests to make it work.The above isn't true and
FileUniqueId
turned out to not be useful for this use case. Anyway, I've decided to update Funogram.TODO: