server: fix issues from latest renovatebot
This commit is contained in:
parent
184ac3011d
commit
f3c5b4eb8c
@ -798,7 +798,7 @@ pub fn extract_alternative(
|
|||||||
let body = sp.get_body()?;
|
let body = sp.get_body()?;
|
||||||
if let Some(ref summary) = ical_summary {
|
if let Some(ref summary) = ical_summary {
|
||||||
// Prepend summary to plain text body (strip HTML tags)
|
// 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);
|
let combined = format!("{}\n\n{}", summary_text.trim(), body);
|
||||||
return Ok(Body::text(combined));
|
return Ok(Body::text(combined));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -45,4 +45,6 @@ pub enum ServerError {
|
|||||||
XmlError(#[from] quick_xml::Error),
|
XmlError(#[from] quick_xml::Error),
|
||||||
#[error("xml encoding error: {0}")]
|
#[error("xml encoding error: {0}")]
|
||||||
XmlEncodingError(#[from] quick_xml::encoding::EncodingError),
|
XmlEncodingError(#[from] quick_xml::encoding::EncodingError),
|
||||||
|
#[error("html to text error: {0}")]
|
||||||
|
Html2TextError(#[from] html2text::Error),
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user