Some emails (received & sent) are displayed in full (including entire quote history) instead of nicely being truncated into small chat bubbles.
- Operating System (Linux/Mac/Windows/iOS/Android): Multiple
- Delta Chat Version: Android Delta Chat 1.26.2, Windows Delta Chat 1.26.0
- Expected behavior: Hide the extra "quoted" parts of emails behind the "Show full message" button while only showing the new response part of the message (usually at the top of new emails). Many/most emails from other programs do behave this way, but some do not. Below will be some examples of emails that do not behave as expected.
- Actual behavior: Entire text of an email appears in the chat bubble without the nice truncation that others have.
- Steps to reproduce the problem: It's hard to say. I think this happens when other people send via certain email programs that format quotes differently from what Delta Chat is looking for.
Forum reference: https://support.delta.chat/t/truncating-quoted-emails-nicely/1979/2
If I send a message to someone from a different email program (like Outlook x86), that message is added to the conversation in Delta Chat correctly, but it is not truncated correctly.
This message was sent first: Raw .EML code example of sent message that does not get truncated properly:
SentAnon_2022-01-03 1327.eml.txt
This message was received as a reply: Raw .EML code example of received message that does not get truncated properly (appears to be sent from Yahoo Mail app on Android): RecievedAnon_2022-01-03 1420.eml.txt
@adamzea Thank you for your report. Could you please edit and post the respective emails chronologically as text (.EML) files, including more information about which email was sent/received, instead? Your post above seems to miss some line breaks, too, which makes your issue difficult to troubleshoot. Thank you in advance!
I think I edited the post according to your request. The TXT files attached are RAW .EML files saved from Thunderbird, but with "Sender" or "Receiver" replacing the actual names/addresses. Also deleted the long thread of other messages that appeared at the end. I don't think you need that, right? If yes, I can probably get other shorter anonymized .EML files that have the same issue. Do those attachments help better? Let me know if you need something more to help troubleshoot.
@adamzea Thank you for editing your report. It seems that I cannot reproduce your issue. I just sent an email from my DC account using Microsoft Outlook, then replied from the other address using Webmail, here is the result:

Also when I reply to these messages, the link "Show Full Message..." is displayed in every green and white bulb.
These are the .EML files from my mail account:
I just had a look at @adamzea's reply - the email body is (quoted-printable decoded):
haha - I wish ..
On Monday, January 3, 2022, 01:27:54 PM EST, Receiver Name <[email protected]> wrote:
You could have stayed in DR for another day though. :)
So, it's pretty obvious why the quote wasn't recognized (it's not computer-readably marked as a quote at all), but I have no idea how we could programmatically recognize this as a quote. I mean, we could recognize the "On ... wrote:", but this would probably create quite a lot of false-positives. We could recognize the "On Weekday, Month D, YYYY, HH:MM:SS _M ___, ... <...> wrote" but that would be very specific to just this very format and quite some work.
Here's another example that has a different "On ... wrote:" format (the date/time is formatted differently), and this one doesn't have the quote recognized/truncated either.

I'll try to investigate more to see if I can help you more reliably reproduce the issue. As I said it's only some, and there are tons of different email clients that do things differently, so I understand the difficulty.
What if there's a user-editable "truncate before" or "Hide text from chat bubbles" listing in the app where I could copy/paste all of the "On ... wrote" formats that don't truncate along with some wildcard character placements. I could also personally put some senders' enormous signatures in there, too. "Sent from my iPhone" and below would be another good one to hide from all the chat bubbles.
https://www.spikenow.com/ and https://mailtime.com/ are two other email apps that seem to be very good at truncating emails into chat bubbles, but they're proprietary and I don't know how they do that.
@adamzea We need to distinguish two scenarios here:
haha - I wish ..
On Monday, January 3, 2022, 01:27:54 PM EST, Receiver Name <[email protected]> wrote:
and
That is great!
> Gesendet: Mittwoch, den 12.01.2022 um 14:02 Uhr
> Von: "Anonymous_1" <[email protected]>
> An: [email protected]
> Betreff: Test
>
> This is a test.
>
The first example neither triggers a quote nor a Show Full Message... link to be created. The On Monday part of the message visually looks like it was typed by the sender. And as @Hocuri pointed out, it is very difficult to catch such phrases, even more when they are localized in various languages.
The only thing I cannot explain is why this part was not put in a quote:

@adamzea Please post the anonymized source (.EML) file of this email, maybe the > character has been inserted differently, or the email itself has a different character set than UTF-8, just speculating. Thanks in advance!
I think I have found the cause of the issue, it has something to do with the length of the On XXX line. When I give the sender a long name, Delta Chat interprets the line as part of the typed message:

This is the upper part:
Very funny!
On Mon, 3 Jan, 2022 at 8:34 PM "Anonymous" <[email protected]> wrote:
> That is funny!
>
>
> On Jan 3, 2022, at 7:58 PM, Anonymous_2 <[email protected]> wrote:
>
> > Hooray!
> >
And this is the following (breaking) part:
Very funny!
On Mon, 3 Jan, 2022 at 8:34 PM "Anonymous The Mighty All of a Sudden" <ano=
[email protected]> wrote:
> That is funny!
>
>
> On Jan 3, 2022, at 7:58 PM, Anonymous_2 The Deal Breaker in Heaven and H=
ell <[email protected]> wrote:
>
> > Hooray!
> >
So I would consider this a bug in Delta Chat.
@adamzea Please post the anonymized source (.EML) file of this email, maybe the
>character has been inserted differently, or the email itself has a different character set than UTF-8, just speculating. Thanks in advance!
See attached. Sorry it took so long. RecievedAnon- 2022-01-12 0824.eml.txt
I think I have found the cause of the issue, it has something to do with the length of the
On XXXline. When I give the sender a long name, Delta Chat interprets the line as part of the typed message
Delta Chat looks at the length of this line here and indeed does not recognize the line if it is too long: https://github.com/deltachat/deltachat-core-rust/blob/6d51d19f0199e541846ef99009754d75728cc45a/src/simplify.rs#L277-L284