kontalk / androidclient

Kontalk official Android client
https://www.kontalk.org
GNU General Public License v3.0
571 stars 194 forks source link

If media compression fails, next reconnection won't do it #1293

Closed daniele-athome closed 4 years ago

daniele-athome commented 4 years ago

Compression occurs by calling MediaService on the act of sending. But that happens after the message has been created on the database. If somehow compression fails, the message won't be compressed again because MediaService won't be called anymore. Either call MediaService on retry (but we need some flag to detect if the media was compressed yet) or store the message only after successful compression. Or just discard the message but leave it there.