- let like = move |conn: &mut _| CommentLike::like(conn, &like_form);
- blocking(context.pool(), like)
- .await?
- .map_err(|e| LemmyError::from_error_message(e, "couldnt_like_comment"))?;
-
- let apub_comment: ApubComment = updated_comment.into();
- CreateOrUpdateComment::send(
- apub_comment.clone(),
- &local_user_view.person.clone().into(),
- CreateOrUpdateType::Create,
- context,
- &mut 0,
- )
- .await?;
+ CommentLike::like(&mut context.pool(), &like_form)
+ .await
+ .with_lemmy_type(LemmyErrorType::CouldntLikeComment)?;