+ #[tracing::instrument(skip_all)]
+ async fn from_json(
+ note: ChatMessage,
+ context: &Data<Self::DataType>,
+ ) -> Result<ApubPrivateMessage, LemmyError> {
+ let creator = note.attributed_to.dereference(context).await?;
+ let recipient = note.to[0].dereference(context).await?;
+ check_person_block(creator.id, recipient.id, &mut context.pool()).await?;
+
+ let content = read_from_string_or_source(¬e.content, &None, ¬e.source);
+ let content = sanitize_html(&content);
+
+ let form = PrivateMessageInsertForm {