| freemangordon | Pali: I think I found what the problem in modest is, but I am not sure how to solve it. | 00:03 |
|---|---|---|
| freemangordon | I lack mime-fu :) | 00:03 |
| freemangordon | Pali: https://github.com/community-ssu/modest/blob/master/src/widgets/modest-attachments-view.c#L168 | 00:04 |
| freemangordon | for some reason modest checks for "multipart/alternative" | 00:05 |
| freemangordon | and if so, the code on https://github.com/community-ssu/modest/blob/master/src/widgets/modest-attachments-view.c#L223 is not executed | 00:05 |
| freemangordon | if I set is_alternate to be false, the missing attachments appear | 00:06 |
| freemangordon | what I can't get is why this check is needed | 00:06 |
| freemangordon | that code was introduced by commit 354a038d69d6b9ac42b49e6c6d3751f7978c4adb ([PATCH] Show digest attachments (and other non body text parts) in attachments view) | 00:08 |
| freemangordon | https://garage.maemo.org/plugins/ggit/browse.php/?p=modest;a=patch;h=354a038d69d6b9ac42b49e6c6d3751f7978c4adb | 00:09 |
| Pali | freemangordon: MIME email contains (mathematical) tree | 00:20 |
| Pali | each node contains email data | 00:20 |
| Pali | and if node is marked as "multipart/alternative" then it means that all subnodes are equivalent, just represent same data in different encodings or formats | 00:21 |
| Pali | e.g. text/plain and text/html | 00:21 |
| Pali | if node is marked as "multipart/mixed" or other multipart/ then its subnodes contains data | 00:22 |
| freemangordon | Pali: but that is not the case(in that mail), as text part contains no attachments, while html part contains | 00:22 |
| Pali | and if missing attachment is only under some subnode of multipart/alternative node, that it could be hidden | 00:23 |
| freemangordon | see http://pastebin.com/wUgr8tkB | 00:23 |
| freemangordon | thunderbird shows the attachments, modest does not | 00:24 |
| Pali | freemangordon: I will run my MIME tree parser on that email | 00:24 |
| freemangordon | wait, it is the header only | 00:24 |
| freemangordon | i'll forward it to you | 00:24 |
| Pali | nope, this contains also body | 00:24 |
| Pali | body of email start after blank line | 00:25 |
| Pali | but please send me it as plain text attachment | 00:25 |
| Pali | so I can inspect original plain text file | 00:25 |
| freemangordon | yep, sure | 00:25 |
| Pali | I think I know where is problem | 00:26 |
| Pali | but rather I would recheck it on original email | 00:26 |
| Pali | first | 00:26 |
| freemangordon | oh, so modest prefers the "text" part and ignores the "html" part? | 00:27 |
| freemangordon | Pali: mail sent | 00:28 |
| Pali | got it | 00:28 |
| Pali | freemangordon: ok, it is as I expected | 00:32 |
| freemangordon | hmm? | 00:33 |
| Pali | MIME email is tree and data (text, attachments, ..) are stored only in leafs | 00:33 |
| freemangordon | so? | 00:33 |
| Pali | root node is marked as alternative, which means that root subnodes are equivalent | 00:33 |
| freemangordon | sure | 00:33 |
| Pali | and that pdf attachment is only in one leaf | 00:33 |
| freemangordon | yes | 00:33 |
| Pali | and thats all, if you interpret that email in other way, then you miss attachment | 00:34 |
| freemangordon | but, shouldn't we show the attachments no matter in which node are they? | 00:34 |
| Pali | correct view of that email is also to hide attachment | 00:34 |
| Pali | freemangordon, no | 00:34 |
| freemangordon | hmm | 00:34 |
| freemangordon | well, that pdf is marked as inline as well, so what you say makes sense | 00:35 |
| freemangordon | Pali: so "freemangordon: oh, so modest prefers the "text" part and ignores the "html" part?" is what happens? | 00:36 |
| Pali | if some node is marked as multipart/alternative it does not matter which subnode you choose for rendering/viewing | 00:36 |
| Pali | freemangordon: I think that modest prefer html | 00:36 |
| Pali | but maybe it is not truth | 00:36 |
| Pali | freemangordon: it does not matter if pdf is marked as inline or as attachment | 00:37 |
| freemangordon | by the look of it, it prefers the text part | 00:37 |
| Pali | in both cases it is same | 00:37 |
| freemangordon | yeah, got that | 00:37 |
| Pali | I know that lot of multipart/alternative emails with html and text parts, modest shown me html version | 00:37 |
| freemangordon | maybe it depends which one comes first | 00:37 |
| Pali | but important note is also that in email parts are ordered | 00:37 |
| Pali | and I think that RFC say something that first is more preferred as second and etc... | 00:38 |
| Pali | no idea if some client respect this order | 00:38 |
| Pali | and also client is free to choose format which support | 00:38 |
| freemangordon | the first node is preferred over the second? | 00:38 |
| Pali | I think RFC say something like that in case that client does not have some other preferences | 00:39 |
| freemangordon | hmm, ok | 00:39 |
| Pali | I think that thunderbird prefer html | 00:39 |
| Pali | and then plain text | 00:39 |
| Pali | my KMail prefer plain text | 00:39 |
| freemangordon | it seems thunderbird shows both :) | 00:40 |
| freemangordon | as I see both "Hallo someone ,some text anotherone " and "anotherone" in bold | 00:41 |
| freemangordon | which doesn;t make sense either | 00:41 |
| freemangordon | Pali: do you see the attachments in your KMail? | 00:42 |
| Pali | I see Einladung.pdf | 00:42 |
| Pali | and image002.png | 00:42 |
| *** LinuxCode has joined #maemo-ssu | 00:42 | |
| freemangordon | well, then there is still a problem in modest it seems | 00:43 |
| freemangordon | as in modest there are no attachments | 00:43 |
| Pali | freemangordon: this is how my MIME tree parser see that email: http://pastebin.com/ra0i1Kf0 | 00:43 |
| Pali | and my MIME viewver does not see PDF file | 00:43 |
| freemangordon | assuming KMail prefers the text node, I see no way for it to show 2 attachments | 00:44 |
| *** LinuxCode has quit IRC | 00:44 | |
| *** LinuxCode has joined #maemo-ssu | 00:44 | |
| Pali | kmail has heurstic | 00:45 |
| Pali | and show this PDF because it does not see it in text subpart | 00:45 |
| Pali | but according to RFCs is correct way also to ignore that PDF part | 00:45 |
| Pali | my MIME viewer did it too | 00:46 |
| freemangordon | well then , "but, shouldn't we show the attachments no matter in which node are they?" :) | 00:46 |
| Pali | apparently not | 00:46 |
| freemangordon | seems KMail does it | 00:46 |
| freemangordon | as does Thunderbird | 00:46 |
| *** LinuxCode_away has joined #maemo-ssu | 00:47 | |
| freemangordon | I won;t argue if it is RFC violation or not | 00:47 |
| Pali | it has some heurstic which could work sometimes, but they can damage (=show wrongly) correctly formatted emails | 00:47 |
| *** LinuxCode_away has quit IRC | 00:47 | |
| Pali | basically there is no difference between attachment or text part | 00:47 |
| Pali | I mean PDF or textfile | 00:48 |
| freemangordon | Pali: yes, I understand | 00:48 |
| *** LinuxCode has quit IRC | 00:48 | |
| Pali | you are free to compose email which is multipart/alternative and has two subnodes: | 00:48 |
| Pali | 1) is final plain/text | 00:48 |
| freemangordon | Pali: http://pastebin.com/xTMCdntw - that one makes modest show the attachments | 00:49 |
| freemangordon | just FYI | 00:49 |
| Pali | 2) is multipart/mixed (which means that has subnodes) and contains 3 additional html nodes | 00:49 |
| freemangordon | and I guess the client is free to choose which one to show | 00:49 |
| Pali | and if you run html2text on every 3 html nodes, join them together and put into 1) final plain/text | 00:49 |
| Pali | that you get normal email message | 00:50 |
| Pali | but which contains 4 nodes... 1 vs 1+1+1 | 00:50 |
| Pali | and you cannot exchange them, you must show either first or another 3 | 00:50 |
| freemangordon | I understand that. | 00:51 |
| Pali | and same it is with PDF files | 00:51 |
| Pali | that email which you sent me is just example of wrongly generated MIME email | 00:51 |
| Pali | and yes, client is free which alternative part will show | 00:52 |
| Pali | generaly it chose that one which can render better :-) | 00:52 |
| Pali | e.g. terminal text email clients (like mutt) prefer plain/text parts, because it can show just monospaced text :-) | 00:53 |
| freemangordon | I guess modest chooses whichever comes first | 00:53 |
| Pali | probably | 00:53 |
| freemangordon | Pali: what about showing the alternative part as an attachment? | 00:54 |
| freemangordon | as email attachment that is | 00:54 |
| Pali | if this bug is assigned to me, I would close it "as not a bug" | 00:55 |
| freemangordon | no, it is not assignet to you | 00:55 |
| freemangordon | *assigned | 00:55 |
| Pali | showing all other alternative parts as attachment is wrong idea | 00:55 |
| Pali | now maybe every email contains two alternative parts: text and html | 00:55 |
| freemangordon | yeah | 00:55 |
| Pali | so basically it show lot of useless attachments... | 00:55 |
| freemangordon | so, the same mail formatted correctly, should be: | 00:56 |
| Pali | better option would be to switch between alternatives | 00:56 |
| Pali | button for switching | 00:56 |
| freemangordon | hmm | 00:56 |
| Pali | kmail as it: switch between text and html | 00:56 |
| freemangordon | I am not sure I can implement stuff like that in modest | 00:56 |
| Pali | I know it is hard, but probably only one acceptable solution... as adding heuristic in any way could damage correct emails | 00:57 |
| freemangordon | yeah | 00:57 |
| Pali | and attachment button for alternative parts just show lot of useless attachments | 00:57 |
| freemangordon | ok, I'll post a link to our discussion on thet TMO thread | 01:00 |
| freemangordon | WONTFIX :) | 01:00 |
| Pali | yes, wontfix is also from my side... it is hard work and just for one incorrectly generated email | 01:04 |
| *** Pali has quit IRC | 01:09 | |
| *** futpib has quit IRC | 02:57 | |
| *** xes has quit IRC | 04:59 | |
| *** xes has joined #maemo-ssu | 05:26 | |
| *** sparetire_ has quit IRC | 06:19 | |
| *** RedW has quit IRC | 08:27 | |
| *** RedW has joined #maemo-ssu | 08:29 | |
| *** Pali has joined #maemo-ssu | 09:30 | |
| *** futpib has joined #maemo-ssu | 12:09 | |
| *** NIN101 has quit IRC | 12:16 | |
| *** NIN101 has joined #maemo-ssu | 12:16 | |
| *** kerio has quit IRC | 14:46 | |
| freemangordon | Pali: https://github.com/community-ssu/modest/blob/master/src/modest-tny-msg.c#L458 | 15:16 |
| freemangordon | after all it seems to me that there is a problem in modest | 15:16 |
| freemangordon | it seems to ignore multipart/mixed when searching for a body | 15:16 |
| freemangordon | that is why I see the text content instead of HTML | 15:17 |
| *** kerio_ has joined #maemo-ssu | 15:17 | |
| *** kerio_ is now known as kerio | 15:18 | |
| Pali | freemangordon: still yesterday problem? | 15:20 |
| Pali | or another? | 15:20 |
| freemangordon | yep, the same problem | 15:21 |
| freemangordon | attachments not visible | 15:21 |
| Pali | I know and I tried to show you proof that it is valid to hide attachment | 15:21 |
| freemangordon | also, according to some docs I found on the net, it is the LAST body (or whatever) that is the best representation | 15:21 |
| Pali | ok, so last part is preferred? | 15:22 |
| freemangordon | also, it is really that modest tries to always use HTML over text | 15:22 |
| freemangordon | yes, the last one should be preffered | 15:22 |
| Pali | I do not remember if first or last, it is just linear order of preferences | 15:22 |
| Pali | ok | 15:22 |
| freemangordon | the first one has lowest priority | 15:23 |
| Pali | ok, then if modest preffer first, then behaviour could be changed | 15:23 |
| freemangordon | no, it seems it prefers html, but just can't find it, as it is in multipart/mixed node | 15:24 |
| freemangordon | but it searches for mulipart/related | 15:24 |
| *** kerio has quit IRC | 15:25 | |
| *** kerio has joined #maemo-ssu | 15:25 | |
| freemangordon | Pali: see what modest_tny_msg_find_body_part_in_alternative does | 15:26 |
| *** sparetire_ has joined #maemo-ssu | 15:45 | |
| freemangordon | Pali: what do you think about that patch: http://pastebin.com/DJWwVf0z | 16:25 |
| freemangordon | it makes HTML version of that dangled message to appear. Still no attachments though | 16:26 |
| Pali | related is not same as multipart/mixed | 16:29 |
| Pali | so it can break other modest part | 16:29 |
| Pali | so first check that multipart/mixed parts do not break modest itself (where it can expect related) | 16:29 |
| freemangordon | any idea how to check it? | 16:31 |
| freemangordon | Pali: also, my change affects only the functions that try to find the massage body in the wanted format (text or HTML) | 16:32 |
| freemangordon | *message | 16:32 |
| freemangordon | I'd assume those are harmless changes | 16:33 |
| *** kerio has quit IRC | 16:39 | |
| *** kerio has joined #maemo-ssu | 16:39 | |
| freemangordon | Pali: what about http://pastebin.com/zNNdUWSe ? | 19:04 |
| freemangordon | it seems to fix the issue | 19:05 |
| freemangordon | will show attachments only in the "preferred" part of mutipart/alternative messages | 19:06 |
| freemangordon | in case of modest, this is the HTML part | 19:06 |
| *** xes has quit IRC | 20:27 | |
| *** xes has joined #maemo-ssu | 21:01 | |
| freemangordon | Pali: ping | 21:49 |
| *** freemangordon1 has joined #maemo-ssu | 22:09 | |
| *** freemangordon has quit IRC | 22:09 | |
| *** brolin_empey_ has joined #maemo-ssu | 22:26 | |
| *** sailus_ has joined #maemo-ssu | 22:27 | |
| *** Raimu-X has joined #maemo-ssu | 22:29 | |
| *** sailus has quit IRC | 22:30 | |
| *** Wizzup has quit IRC | 22:30 | |
| *** APic has quit IRC | 22:30 | |
| *** kerio has quit IRC | 22:30 | |
| *** Wizzup has joined #maemo-ssu | 22:30 | |
| *** APic has joined #maemo-ssu | 22:31 | |
| *** panais has quit IRC | 22:32 | |
| *** brolin_empey has quit IRC | 22:32 | |
| *** Raimu has quit IRC | 22:32 | |
| *** panais has joined #maemo-ssu | 22:32 | |
| *** kerio has joined #maemo-ssu | 22:33 | |
| *** brolin_empey_ is now known as brolin_empey | 22:33 | |
| *** M4rtinK has joined #maemo-ssu | 22:54 | |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!