Skip to content

Conversation

@Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented Jan 13, 2026

Before this PR, when a user with current main sends a large message to a user with an old Delta Chat (before #7431), the text will be duplicated: One message will arrive with only the text, and one message with attachment+text.

This PR changes this - there will be one message with only the text, and one message with only the attachment.

If we want to guard against lost pre-messages, then we can revert this PR in a few months, though I'm not sure that's necessary - it's unlikely that the small pre-message gets lost but the big post-message gets through.

Edit: The disadvantage of this PR is that message reordering can lead to lost text: If the pre-message arrives after the post-message, then the text won't be added to the post-message. I'm merging it anyways for now, since message reordering is very rare.

@Hocuri Hocuri requested review from link2xt and r10s January 13, 2026 14:31
Copy link
Contributor

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good temporary solution.

@iequidoo
Copy link
Collaborator

Then, if messages arrive reordered, we need to add the pre-message as a new text message, maybe quoting the message with attachment. Or add the text to the attachment message and mark all messages starting from it as fresh. Just dropping the text away when we've finally received it is a bug.

@iequidoo
Copy link
Collaborator

#7712 looks as a better solution to me

@r10s
Copy link
Contributor

r10s commented Jan 13, 2026

#7712 has the big disadvantage, that the "Auto-Download Messages" option becomes completely non-working, with no chance for the user to fix it. that would probably even require UI adaption

with this PR, or even without, things get better over time when your friends upgrade

for out-of-order: well, that is a cornercase, esp when compared to "Auto-Download Messages" not working.
also, we can re-add the text anytime again.

so, i also think, this PR is a good temporary compromise, not letting messagess in old clients apper too weird

@iequidoo
Copy link
Collaborator

I though that #7712 is a better solution because i had a device with 2.34 and it wasn't receiving big messages from main Core at all, it was showing empty text messages w/o any download button. But now i can't reproduce the problem, i see an empty message followed by another message with the "Download" button

@iequidoo
Copy link
Collaborator

it's unlikely that the small pre-message gets lost but the big post-message gets through.

It may not necessarily depend on the message size, you can imagine a buggy server that drops every 10th message, or delays every 10th message. So as a temporary solution this PR can work, but not as a permanent, otherwise we need to warn users that images may arrive w/o text, etc.

@iequidoo
Copy link
Collaborator

Maybe, if the pre-message is lost, at least add some placeholder text explaining that or set msgs.error so that the user knows about the problem?

@Hocuri Hocuri merged commit ccae73f into main Jan 14, 2026
30 checks passed
@Hocuri Hocuri deleted the hoc/no-text-in-post-msg branch January 14, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants