-
-
Notifications
You must be signed in to change notification settings - Fork 100
fix: Treat and send images that can't be decoded as Viewtype::File #6904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
7d529fe
to
ea615da
Compare
ea615da
to
98baeb7
Compare
`Viewtype::Sticker` has special meaning: the file should be an image having fully transparent pixels. But "tgs" (Telegram animated sticker) is a compressed JSON and isn't recognized by Core as image.
Guessing mimetype is already done in `chat::prepare_msg_blob()`.
98baeb7
to
5ba3d29
Compare
Tested in Desktop. Note that if an image is sent as |
Otherwise unsupported and corrupted images are displayed in the "Images" tab in UIs and that looks as a Delta Chat bug. This should be a rare case though, so log it as error and let the user know that metadata isn't removed from the image at least.
We don't want images having unsupported format or corrupted ones to be sent as `Image` and appear in the "Images" tab in UIs because they can't be displayed correctly.
5ba3d29
to
4917336
Compare
Now i think this isn't a correct behavior. If smth can't be sent as image, the metadata isn't removed and a potentially big file is sent. It's better to fail sending. The user should retry to send the "image" as EDIT: I have no idea why we implemented this unsafe sending of the original file. Does anyone know? |
See commit messages and also deltachat/deltachat-desktop#3879 for reasoning.