Skip to content

Commit

Permalink
bump melib to version 0.8.7
Browse files Browse the repository at this point in the history
This also updates attachment.text to pass Text::Rfc822 due to an API change
in melib.
  • Loading branch information
kevinschoon committed Aug 13, 2024
1 parent f425cf0 commit 346527c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mailpot-archives/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fn run_app() -> std::result::Result<(), Box<dyn std::error::Error>> {
let envelope = melib::Envelope::from_bytes(post.message.as_slice(), None)
.map_err(|err| format!("Could not parse mail {}: {err}", post.message_id))?;
let body = envelope.body_bytes(post.message.as_slice());
let body_text = body.text();
let body_text = body.text(melib::attachment_types::Text::Rfc822);
let subject = envelope.subject();
let mut subject_ref = subject.trim();
if subject_ref.starts_with('[')
Expand Down
4 changes: 2 additions & 2 deletions mailpot-web/src/lists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pub async fn list_post(
.map(|(depth, p)| {
let envelope = melib::Envelope::from_bytes(p.message.as_slice(), None).unwrap();
let body = envelope.body_bytes(p.message.as_slice());
let body_text = body.text();
let body_text = body.text(melib::attachment_types::Text::Rfc822);
let date = envelope.date_as_str().to_string();
(depth, p, body_text, date)
})
Expand All @@ -199,7 +199,7 @@ pub async fn list_post(
let envelope = melib::Envelope::from_bytes(post.message.as_slice(), None)
.with_status(StatusCode::BAD_REQUEST)?;
let body = envelope.body_bytes(post.message.as_slice());
let body_text = body.text();
let body_text = body.text(melib::attachment_types::Text::Rfc822);
let subject = envelope.subject();
let mut subject_ref = subject.trim();
if subject_ref.starts_with('[')
Expand Down
2 changes: 1 addition & 1 deletion mailpot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ chrono = { version = "^0.4", features = ["serde", ] }
data-encoding = { version = "2.1.1" }
jsonschema = { version = "0.17", default-features = false }
log = "0.4"
melib = { version = "0.8.6", default-features = false, features = ["mbox", "smtp", "maildir"] }
melib = { version = "0.8.7", default-features = false, features = ["mbox", "smtp", "maildir"] }
minijinja = { version = "0.31.0", features = ["source", ] }
percent-encoding = { version = "^2.1" }
rusqlite = { version = "^0.30", features = ["bundled", "functions", "trace", "hooks", "serde_json", "array", "chrono", "unlock_notify"] }
Expand Down
2 changes: 1 addition & 1 deletion mailpot/src/posts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ impl Connection {
env.from(),
);
let body = env.body_bytes(raw);
let password = body.text();
let password = body.text(melib::attachment_types::Text::Rfc822);
// TODO: validate SSH public key with `ssh-keygen`.
for f in env.from() {
let email_from = f.get_email();
Expand Down

0 comments on commit 346527c

Please sign in to comment.