codingteam / emulsion

XMPP ↔ Telegram bridge
MIT License
33 stars 3 forks source link

#147: add a web redirector service #155

Closed ForNeVeR closed 2 years ago

ForNeVeR commented 2 years ago

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 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.

TODO:

ForNeVeR commented 2 years ago

One problem I am still struggling with is figuring out the FileUniqueId business.

For now, it seems Telegram sends us several different UniqueIds for each image send to Telegram, what the actual hell.