crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit 4b04e93f9333e546d2419c975abf801dbc5c40a0
parent cab611cac5c41ef47e883034451cbf4b65e5142e
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Wed, 22 Dec 2021 21:29:04 -0800

fix reply links -- no nested Re:

Diffstat:
Msrc/main.rs | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -305,7 +305,7 @@ impl<'a> MailThread<'a> { } br; div(class="bold"){ - a (href=message.mailto()) { + a (href=message.mailto(&root.subject)) { :"✉️ Reply" } } @@ -325,7 +325,7 @@ impl<'a> MailThread<'a> { impl Email { // mailto:... populated with everything you need - pub fn mailto(&self) -> String { + pub fn mailto(&self, thread_subject: &str) -> String { // TODO configurable let mut url = format!("mailto:{}?", Config::global().list_email); @@ -337,7 +337,7 @@ impl Email { // TODO verify encoding looks good and use percent_encoding instead pushencode("cc", &from); pushencode("in-reply-to", &self.id); - pushencode("subject", &format!("Re: {}", self.subject)); + pushencode("subject", &format!("Re: {}", thread_subject)); url.pop(); url.into() }