Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0110d6d
fix python lint errors
Simon-Laux Oct 31, 2025
e7751ce
receive pre-mesages, start with changes to imap loop.
Simon-Laux Nov 9, 2025
31a91d2
simplify code a bit
Simon-Laux Nov 12, 2025
c928c4b
refactor: move download code from `scheduler.rs` to `download.rs`, also
Simon-Laux Nov 12, 2025
6985536
`MAX_FETCH_MSG_SIZE` is no longer unused
Simon-Laux Nov 12, 2025
45de7cd
Parse if it is a pre-message or full-message
Simon-Laux Nov 14, 2025
fa063da
start with receiving logic
Simon-Laux Nov 14, 2025
a5d9ed2
get rid of `MsgId::get_by_rfc724_mid` because it was a duplicate of
Simon-Laux Nov 14, 2025
511d4d2
docs: add hint to `MimeMessage::from_bytes` stating that it has
Simon-Laux Nov 16, 2025
38e2745
receiving full message
Simon-Laux Nov 16, 2025
07a8d2f
send and receive `attachment_size` and set viewtype to text in
Simon-Laux Nov 16, 2025
c260576
metadata as struct in pre-message in header. And fill params that we can
Simon-Laux Nov 22, 2025
7f3d2f5
api: jsonrpc: add `full_message_view_type` to `Message` and
Simon-Laux Nov 22, 2025
ea511d4
apply clippy suggestion
Simon-Laux Nov 22, 2025
ce7e62e
make PreMsgMetadata.to_header_value not consume self/PreMsgMetadata
Simon-Laux Nov 22, 2025
f5577d9
add api to merge params
Simon-Laux Nov 23, 2025
ca6bf65
on download full message: merge new params into old params and remove
Simon-Laux Nov 23, 2025
b9a4c43
move tests to `src/tests/pre_messages.rs`
Simon-Laux Nov 29, 2025
f1f9868
dynamically allocate test attachment bytes
Simon-Laux Nov 30, 2025
01cee7e
fix detection of pre-messages. (it looked for the ChatFullMessageId
Simon-Laux Nov 30, 2025
59b55e3
fix setting dl state to avaiable on pre-messages
Simon-Laux Nov 30, 2025
91e8f67
fix: save pre message with rfc724_mid of full message als disable
Simon-Laux Nov 30, 2025
d361eeb
add some receiving tests and update test todo for premessage metadata
Simon-Laux Nov 30, 2025
5230aba
test: process full message before pre-message
Simon-Laux Nov 30, 2025
99610b2
test receive normal message
Simon-Laux Nov 30, 2025
15fa49b
some serialization tests for PreMsgMetadata
Simon-Laux Nov 30, 2025
6042d17
remove outdated todo comment
Simon-Laux Nov 30, 2025
9cff662
test that pre-message contains message text
Simon-Laux Nov 30, 2025
1ae1a34
PreMsgMetadata: test_build_from_file_msg and test_build_from_file_msg
Simon-Laux Nov 30, 2025
b5629e9
test: test_receive_pre_message_image
Simon-Laux Nov 30, 2025
156d5b8
Test receiving the full message after receiving an edit after receiving
Simon-Laux Nov 30, 2025
957e967
test_reaction_on_pre_message
Simon-Laux Nov 30, 2025
4bbe0c1
test_full_download_after_trashed
Simon-Laux Nov 30, 2025
59ca831
test_webxdc_update_for_not_downloaded_instance
Simon-Laux Nov 30, 2025
477e2ee
simplify fake webxdc generation in
Simon-Laux Nov 30, 2025
5e499d8
test_markseen_pre_msg
Simon-Laux Nov 30, 2025
9803b30
test_pre_msg_can_start_chat and test_full_msg_can_start_chat
Simon-Laux Nov 30, 2025
0934daf
test_download_later_keeps_message_order
Simon-Laux Nov 30, 2025
d70bfcd
test_chatlist_event_on_full_msg_download
Simon-Laux Nov 30, 2025
ad429a8
fix download not working
Simon-Laux Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion deltachat-ffi/deltachat.h
Original file line number Diff line number Diff line change
Expand Up @@ -4283,7 +4283,8 @@ char* dc_msg_get_webxdc_info (const dc_msg_t* msg);

/**
* Get the size of the file. Returns the size of the file associated with a
* message, if applicable.
* message, if applicable.
* If message is a pre-message, then this returns size of the to be downloaded file.
*
* Typically, this is used to show the size of document files, e.g. a PDF.
*
Expand Down
10 changes: 10 additions & 0 deletions deltachat-jsonrpc/src/api/types/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ pub struct MessageObject {
has_location: bool,
has_html: bool,
view_type: MessageViewtype,
/// If message is a pre-message,
/// then this returns the viewtype it will have when it is downloaded.
full_message_view_type: Option<MessageViewtype>,
state: u32,

/// An error text, if there is one.
Expand Down Expand Up @@ -92,6 +95,8 @@ pub struct MessageObject {

file: Option<String>,
file_mime: Option<String>,
/// Returns the size of the file in bytes, if applicable.
/// If message is a pre-message, then this returns size of the to be downloaded file.
file_bytes: u64,
file_name: Option<String>,

Expand Down Expand Up @@ -210,6 +215,7 @@ impl MessageObject {
has_location: message.has_location(),
has_html: message.has_html(),
view_type: message.get_viewtype().into(),
full_message_view_type: message.get_full_message_viewtype().map(Into::into),
state: message
.get_state()
.to_u32()
Expand Down Expand Up @@ -681,6 +687,9 @@ pub struct MessageInfo {
rfc724_mid: String,
server_urls: Vec<String>,
hop_info: String,
/// If message is a pre-message,
/// then this returns the viewtype it will have when it is downloaded.
full_message_view_type: Option<MessageViewtype>,
}

impl MessageInfo {
Expand All @@ -704,6 +713,7 @@ impl MessageInfo {
rfc724_mid: message.rfc724_mid().to_owned(),
server_urls,
hop_info,
full_message_view_type: message.get_full_message_viewtype().map(Into::into),
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion deltachat-rpc-client/tests/test_something.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pytest

from deltachat_rpc_client import Contact, EventType, Message, events
from deltachat_rpc_client.const import DownloadState, MessageState
from deltachat_rpc_client.const import MessageState
from deltachat_rpc_client.pytestplugin import E2EE_INFO_MSGS
from deltachat_rpc_client.rpc import JsonRpcError

Expand Down
8 changes: 7 additions & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ impl Context {
convert_folder_meaning(self, folder_meaning).await?
{
connection
.fetch_move_delete(self, &mut session, &watch_folder, folder_meaning)
.fetch_move_delete(self, &mut session, true, &watch_folder, folder_meaning)
.await?;
}
}
Expand All @@ -605,6 +605,12 @@ impl Context {
warn!(self, "Failed to update quota: {err:#}.");
}
}

// OPTIONAL TODO: if time left start downloading messages
// while (msg = download_when_normal_starts) {
// if not time_left {break;}
// connection.download_message(msg) }
// }
}

info!(
Expand Down
Loading
Loading