deltachat-core-rust
deltachat-core-rust copied to clipboard
fix: Treat and send images that can't be decoded as Viewtype::File
See commit messages and also https://github.com/deltachat/deltachat-desktop/issues/3879 for reasoning.
Tested in Desktop. Note that if an image is sent as File, it will be shown as Image and have "image/..." mimetype on both sides, i.e. the behavior doesn't change, because we don't try to decode the image and don't know that it has the wrong format. EDIT: This is fixed by feat: Check images passed as File before making them Image.
fix: Treat and send images that can't be decoded as Viewtype::File
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 File. Going to fix this.
EDIT: I have no idea why we implemented this unsafe sending of the original file. Does anyone know? EDIT: Ok, this is a separate problem and should be fixed in another PR.