web & server: add support for email photos

This commit is contained in:
2025-01-14 12:05:03 -08:00
parent f27f0deb38
commit 5a997e61da
7 changed files with 255 additions and 45 deletions

View File

@@ -237,6 +237,7 @@ impl Body {
pub struct Email {
pub name: Option<String>,
pub addr: Option<String>,
pub photo_url: Option<String>,
}
impl fmt::Display for Email {
@@ -422,6 +423,7 @@ impl QueryRoot {
}
let mut connection = Connection::new(has_previous_page, has_next_page);
// Set starting offset as the value from cursor to preserve state if no results from a corpus survived the truncation
let mut newsreader_offset =
after.as_ref().map(|sc| sc.newsreader_offset).unwrap_or(0);
let mut notmuch_offset = after.as_ref().map(|sc| sc.notmuch_offset).unwrap_or(0);
@@ -487,7 +489,7 @@ impl QueryRoot {
if newsreader::is_newsreader_thread(&thread_id) {
Ok(newsreader::thread(config, pool, thread_id).await?)
} else {
Ok(nm::thread(nm, thread_id, debug_content_tree).await?)
Ok(nm::thread(nm, pool, thread_id, debug_content_tree).await?)
}
}
}