context: &LemmyContext,
comment_id: CommentId,
local_user_view: Option<LocalUserView>,
- form_id: Option<String>,
recipient_ids: Vec<LocalUserId>,
) -> Result<CommentResponse, LemmyError> {
let person_id = local_user_view.map(|l| l.person.id);
Ok(CommentResponse {
comment_view,
recipient_ids,
- form_id,
})
}
pub post_id: PostId,
pub parent_id: Option<CommentId>,
pub language_id: Option<LanguageId>,
- /// An optional front-end ID, to help UIs determine where the comment should go.
- pub form_id: Option<String>,
pub auth: Sensitive<String>,
}
pub comment_id: CommentId,
pub content: Option<String>,
pub language_id: Option<LanguageId>,
- pub form_id: Option<String>,
pub auth: Sensitive<String>,
}
pub struct CommentResponse {
pub comment_view: CommentView,
pub recipient_ids: Vec<LocalUserId>,
- /// An optional front end ID, to tell which is coming back
- pub form_id: Option<String>,
}
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
check_private_instance(&local_user_view, &local_site)?;
Ok(Json(
- build_comment_response(&context, data.id, local_user_view, None, vec![]).await?,
+ build_comment_response(&context, data.id, local_user_view, vec![]).await?,
))
}