Compare commits

..

2 commits

Author SHA1 Message Date
Clément DOUIN ec3f915922
bump email-lib and imap-flow suite 2024-05-26 13:36:25 +02:00
Clément DOUIN 16d273febc
wip: fix thread id mapping 2024-05-26 11:54:13 +02:00
4 changed files with 21 additions and 21 deletions

24
Cargo.lock generated
View file

@ -1399,6 +1399,7 @@ dependencies = [
[[package]]
name = "email-lib"
version = "0.24.1"
source = "git+https://git.sr.ht/~soywod/pimalaya?branch=thread#bbb579312d7f10dd3359cc5068b6eb7d5d7fee50"
dependencies = [
"advisory-lock",
"async-ctrlc",
@ -2187,7 +2188,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
"socket2 0.5.6",
"socket2 0.4.10",
"tokio",
"tower-service",
"tracing",
@ -2221,7 +2222,7 @@ dependencies = [
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core 0.52.0",
"windows-core",
]
[[package]]
@ -2271,6 +2272,7 @@ dependencies = [
[[package]]
name = "imap-client"
version = "0.1.0"
source = "git+https://github.com/soywod/imap-flow.git?branch=session#7d60dd27829b82602e7c7f794633aef432f4c191"
dependencies = [
"imap-flow",
"once_cell",
@ -2285,7 +2287,7 @@ dependencies = [
[[package]]
name = "imap-codec"
version = "2.0.0"
source = "git+https://github.com/duesee/imap-codec.git#d6b265fd01123334db2d48100537eb140932589c"
source = "git+https://github.com/duesee/imap-codec.git#638924e92d9a8ea82208397d8e739110296daf01"
dependencies = [
"abnf-core",
"base64 0.21.7",
@ -2300,6 +2302,7 @@ dependencies = [
[[package]]
name = "imap-flow"
version = "0.1.0"
source = "git+https://github.com/soywod/imap-flow.git?branch=session#7d60dd27829b82602e7c7f794633aef432f4c191"
dependencies = [
"bounded-static",
"bytes",
@ -2315,7 +2318,7 @@ dependencies = [
[[package]]
name = "imap-types"
version = "2.0.0"
source = "git+https://github.com/duesee/imap-codec.git#d6b265fd01123334db2d48100537eb140932589c"
source = "git+https://github.com/duesee/imap-codec.git#638924e92d9a8ea82208397d8e739110296daf01"
dependencies = [
"base64 0.21.7",
"bounded-static",
@ -4579,6 +4582,7 @@ dependencies = [
[[package]]
name = "tag-generator"
version = "0.1.0"
source = "git+https://github.com/soywod/imap-flow.git?branch=session#7d60dd27829b82602e7c7f794633aef432f4c191"
dependencies = [
"imap-types",
"rand",
@ -4593,6 +4597,7 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
[[package]]
name = "tasks"
version = "0.1.0"
source = "git+https://github.com/soywod/imap-flow.git?branch=session#7d60dd27829b82602e7c7f794633aef432f4c191"
dependencies = [
"imap-flow",
"imap-types",
@ -5235,7 +5240,7 @@ version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9"
dependencies = [
"windows-core 0.51.1",
"windows-core",
"windows-targets 0.48.5",
]
@ -5248,15 +5253,6 @@ dependencies = [
"windows-targets 0.48.5",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.5",
]
[[package]]
name = "windows-sys"
version = "0.48.0"

View file

@ -87,11 +87,8 @@ uuid = { version = "0.8", features = ["v4"] }
[patch.crates-io]
# WIP: transition from `imap` to `imap-codec`
email-lib = { path = "/home/soywod/sourcehut/pimalaya/email" }
imap-client = { path = "/home/soywod/code/imap-flow/client" }
tasks = { path = "/home/soywod/code/imap-flow/tasks" }
# email-lib = { git = "https://git.sr.ht/~soywod/pimalaya" }
# imap-client = { git = "https://github.com/soywod/imap-flow.git", branch = "session" }
# tasks = { git = "https://github.com/soywod/imap-flow.git", branch = "session" }
email-lib = { git = "https://git.sr.ht/~soywod/pimalaya", branch = "thread" }
imap-client = { git = "https://github.com/soywod/imap-flow.git", branch = "session" }
tasks = { git = "https://github.com/soywod/imap-flow.git", branch = "session" }
imap-codec = { git = "https://github.com/duesee/imap-codec.git" }
imap-types = { git = "https://github.com/duesee/imap-codec.git" }

View file

@ -729,6 +729,7 @@ impl Backend {
) -> Result<ThreadedEnvelopes> {
let backend_kind = self.toml_account_config.thread_envelopes_kind();
let id_mapper = self.build_id_mapper(folder, backend_kind)?;
let id = id_mapper.get_id(id)?;
let envelopes = self
.backend
.thread_envelope(folder, SingleId::from(id), opts)

View file

@ -267,7 +267,12 @@ impl ThreadedEnvelopes {
let prev_edges = envelopes
.graph()
.all_edges()
.map(|(a, b, w)| (a.id.to_string(), b.id.to_string(), *w));
.map(|(a, b, w)| {
let a = id_mapper.get_or_create_alias(&a.id)?;
let b = id_mapper.get_or_create_alias(&b.id)?;
Ok((a, b, *w))
})
.collect::<Result<Vec<_>>>()?;
let envelopes = envelopes
.map()
@ -277,6 +282,7 @@ impl ThreadedEnvelopes {
let envelope = email::envelope::Envelope {
id: id.clone(),
message_id: envelope.message_id.clone(),
in_reply_to: envelope.in_reply_to.clone(),
flags: envelope.flags.clone(),
subject: envelope.subject.clone(),
from: envelope.from.clone(),