]> Untitled Git - lemmy.git/blobdiff - crates/api/src/comment.rs
Rewrite fetcher (#1792)
[lemmy.git] / crates / api / src / comment.rs
index 06510251f61f2308de9b077064f5462f9943726b..0af3324fae0b082159496a614a384ff858081944 100644 (file)
@@ -4,6 +4,7 @@ use lemmy_api_common::{
   blocking,
   check_community_ban,
   check_downvotes_enabled,
+  check_person_block,
   comment::*,
   get_local_user_view_from_jwt,
 };
@@ -12,7 +13,7 @@ use lemmy_apub::{
     undo_vote::UndoVote,
     vote::{Vote, VoteType},
   },
-  PostOrComment,
+  fetcher::post_or_comment::PostOrComment,
 };
 use lemmy_db_queries::{source::comment::Comment_, Likeable, Saveable};
 use lemmy_db_schema::{source::comment::*, LocalUserId};
@@ -151,6 +152,13 @@ impl Perform for CreateCommentLike {
     )
     .await?;
 
+    check_person_block(
+      local_user_view.person.id,
+      orig_comment.get_recipient_id(),
+      context.pool(),
+    )
+    .await?;
+
     // Add parent user to recipients
     let recipient_id = orig_comment.get_recipient_id();
     if let Ok(local_recipient) = blocking(context.pool(), move |conn| {