crabmail

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

commit 06dd77f7fb1713c1c6d2f67f60e55683c575cd53
parent 9774180fd72d3183e6cd47338e6761bb65b4cd12
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Thu, 17 Mar 2022 21:54:37 -0700

add from

Diffstat:
Msrc/templates/html.rs | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/templates/html.rs b/src/templates/html.rs @@ -49,12 +49,21 @@ impl List { <a class="bigger" href="threads/{path_id}.html">{subject}</a> <br> {preview}<br> - joe@schmoe.com | n replies | last-reply-date + {from} | n replies | last-reply-date "#, &[ ("path_id", &x(thread.pathescape_msg_id().to_str().unwrap())), ("subject", &x(&thread.subject)), ("date", &x(&thread.date)), + ( + "from", + &x(&thread // awkawrd + .from + .name + .clone() + .unwrap_or(thread.from.address.clone()) + .clone()), + ), ("preview", &x(&thread.preview)), ], )