Skip to content

Conversation

@Simon-Laux
Copy link
Contributor

@Simon-Laux Simon-Laux commented Nov 12, 2025

This PR implements receiving of pre-message, download of full messages and the new logic for deciding what to fetch when from IMAP.

This is part of #7367


progress:

  • changes to imap loop
  • change download table to work with rfc724_mid instead of msg_id (added db migration for it)
  • add a table for available_full_msgs
  • move download logic from scheduler.rs to download.rs
  • receive_imf
    • implement pre message
    • implement full message (if pre message exists then replace only attachment and change view type)
  • re-check logic / self review
  • write tests (recycle old tests that I removed in remove: partial downloads (remove creation of the stub messages) #7373 and write new ones)

specific aspects that should become reality:

  • In receive_imf, the full-message can be handled similarly to Chat-Edit (grep for "ChatEdit" in receive_imf.rs).
  • As opposed to the current download-on-demand, we won't replace the whole msgs row, because this way, it will just work if an edit-message is received, and then later the user requests to download the attachment.
    • Need to change Viewtype, probably metadata params like image size
  • pre-message gets Viewtype::Text in the database until downloaded
  • background_fetch should not download messages with the Chat-Is-Full-Message header. If a large message without this flag is received, the UI should be notified via an event.
  • A read receipt should be shown already when the user saw the pre-message.

@Simon-Laux Simon-Laux mentioned this pull request Nov 12, 2025
7 tasks
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.

2 participants