server: fix issues from latest renovatebot

This commit is contained in:
Bill Thiede 2025-09-02 19:11:19 -07:00
parent 184ac3011d
commit f3c5b4eb8c
2 changed files with 3 additions and 1 deletions

View File

@ -798,7 +798,7 @@ pub fn extract_alternative(
let body = sp.get_body()?;
if let Some(ref summary) = ical_summary {
// Prepend summary to plain text body (strip HTML tags)
let summary_text = html2text::from_read(summary.as_bytes(), 80);
let summary_text = html2text::from_read(summary.as_bytes(), 80)?;
let combined = format!("{}\n\n{}", summary_text.trim(), body);
return Ok(Body::text(combined));
} else {

View File

@ -45,4 +45,6 @@ pub enum ServerError {
XmlError(#[from] quick_xml::Error),
#[error("xml encoding error: {0}")]
XmlEncodingError(#[from] quick_xml::encoding::EncodingError),
#[error("html to text error: {0}")]
Html2TextError(#[from] html2text::Error),
}