deltachat-core-rust icon indicating copy to clipboard operation
deltachat-core-rust copied to clipboard

Don't prefetch Chat-Version and Auto-Submitted headers, try to find out message encryption state instead

Open iequidoo opened this issue 1 month ago • 3 comments

Separated from #7405 the commits which can be already merged (don't conflict with removal of partial downloads). Probably it makes to merge them earlier to avoid compatibility issues when we remove Chat-Version from the outer headers.

This tries to find out message encryption state looking at Content-Type and Subject. Basically, encrypted messages are considered as chat messages and moved to the DeltaChat folder if MvboxMove is on.

iequidoo avatar Nov 10 '25 18:11 iequidoo

CI is failing. Edit: Might be that our CI server is having some problems

Hocuri avatar Nov 11 '25 20:11 Hocuri

CI is failing. Edit: Might be that our CI server is having some problems

Yes, there were random timeouts in various tests. Now everything works except test_qr_securejoin_broadcast[False], it looks like the test tries to get a chatlist too fast:

        bob2.wait_for_securejoin_joiner_success()
...
>       chat = ac.get_chatlist(query="Broadcast channel!")[0]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       IndexError: list index out of range

The corresponding log is

DEBUG    root:rpc.py:189 account_id=5 got an event {'kind': 'Info', 'msg': 'src\\receive_imf.rs:535: Receiving message "a07437d5-71b4-4579-9e58-044241a2ce6e@localhost", seen=false...'}
DEBUG    root:rpc.py:189 account_id=5 got an event {'kind': 'Info', 'msg': 'src\\receive_imf.rs:661: Chat assignment is MailingListOrBroadcast.'}
DEBUG    root:rpc.py:189 account_id=5 got an event {'kind': 'Info', 'msg': 'src\\securejoin.rs:369: Received secure-join message "vg-member-added".'}
DEBUG    root:rpc.py:189 account_id=5 got an event {'contactId': 11, 'kind': 'SecurejoinJoinerProgress', 'progress': 1000}
---------------------------- Captured log teardown ----------------------------

Maybe the chat hasn't been created by then. https://github.com/chatmail/core/actions/runs/19285544652/job/55146004434?pr=7426

iequidoo avatar Nov 12 '25 04:11 iequidoo

After a chat with @link2xt and @hpk42, we don't want to move all encrypted messages to the DeltaChat folder. Reasons are that we don't want to accidentally move a non-Delta-Chat message that is then missed by the user. And that we long-term, we even want to completely get rid of message-moving logic, so, we don't want to modify this logic now. So, we'll just start to encrypt Chat-Version headers sometime in February or March, and people who relied on the moving of messages will have to setup their own message-moving logic.

I think that the second commit, "feat: Don't download group messages unconditionally", can be merged independently.

Hocuri avatar Dec 01 '25 17:12 Hocuri