"to": [
"https://queer.hacktivis.me/users/lanodan"
],
- "content": "Hello hello, testing",
+ "content": "<p>Hello hello, testing</p>\n",
"mediaType": "text/html",
"source": {
"content": "Hello hello, testing",
"attributedTo": "https://enterprise.lemmy.ml/u/picard",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"inReplyTo": "https://enterprise.lemmy.ml/post/55143",
- "content": "first comment!",
+ "content": "<p>first comment!</p>\n",
"mediaType": "text/html",
"source": {
"content": "first comment!",
},
PostOrComment,
};
+use lemmy_utils::utils::markdown_to_html;
#[derive(Clone, Debug)]
pub struct ApubComment(Comment);
id: self.ap_id.to_owned().into_inner(),
attributed_to: ObjectId::new(creator.actor_id),
to: vec![public()],
- content: self.content.clone(),
+ content: markdown_to_html(&self.content),
media_type: Some(MediaTypeHtml::Html),
source: SourceCompat::Lemmy(Source {
content: self.content.clone(),
},
traits::Crud,
};
-use lemmy_utils::{utils::convert_datetime, LemmyError};
+use lemmy_utils::{
+ utils::{convert_datetime, markdown_to_html},
+ LemmyError,
+};
use lemmy_websocket::LemmyContext;
use std::ops::Deref;
use url::Url;
id: self.ap_id.clone().into(),
attributed_to: ObjectId::new(creator.actor_id),
to: [ObjectId::new(recipient.actor_id)],
- content: self.content.clone(),
+ content: markdown_to_html(&self.content),
media_type: Some(MediaTypeHtml::Html),
source: Some(Source {
content: self.content.clone(),