Co-authored-by: Kradyz <k@radiz.nl>
use activitystreams_kinds::public;
use anyhow::anyhow;
use chrono::NaiveDateTime;
use activitystreams_kinds::public;
use anyhow::anyhow;
use chrono::NaiveDateTime;
+use html2md::parse_html;
use lemmy_api_common::{
context::LemmyContext,
request::fetch_site_data,
use lemmy_api_common::{
context::LemmyContext,
request::fetch_site_data,
- .and_then(|c| c.lines().next().map(ToString::to_string))
+ .as_ref()
+ .and_then(|c| parse_html(c).lines().next().map(ToString::to_string))
})
.ok_or_else(|| anyhow!("Object must have name or content"))?;
if name.chars().count() > MAX_TITLE_LENGTH {
})
.ok_or_else(|| anyhow!("Object must have name or content"))?;
if name.chars().count() > MAX_TITLE_LENGTH {