]> Untitled Git - lemmy.git/commitdiff
Fixing liking comment on blocked person. Fixes #2033 (#2042)
authorDessalines <dessalines@users.noreply.github.com>
Wed, 19 Jan 2022 14:17:18 +0000 (09:17 -0500)
committerGitHub <noreply@github.com>
Wed, 19 Jan 2022 14:17:18 +0000 (14:17 +0000)
crates/api/src/comment.rs
crates/api/src/post.rs
crates/apub_lib/src/object_id.rs
crates/routes/src/feeds.rs

index ac066227e08adf20d78aeed30e4cb45cb974fe47..64bb7310da3ab9e65e3b62f9e0c25749d7b47cd5 100644 (file)
@@ -6,7 +6,6 @@ use lemmy_api_common::{
   blocking,
   check_community_ban,
   check_downvotes_enabled,
-  check_person_block,
   comment::*,
   get_local_user_view_from_jwt,
 };
@@ -167,13 +166,6 @@ 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| {
index 64c3a930bca4fff0fb4134606eabaaa6a35027ed..0b77bb95dcf59deb299f1d620506aebec1795553 100644 (file)
@@ -5,7 +5,6 @@ use lemmy_api_common::{
   check_community_ban,
   check_community_deleted_or_removed,
   check_downvotes_enabled,
-  check_person_block,
   get_local_user_view_from_jwt,
   is_mod_or_admin,
   mark_post_as_read,
@@ -59,8 +58,6 @@ impl Perform for CreatePostLike {
     check_community_ban(local_user_view.person.id, post.community_id, context.pool()).await?;
     check_community_deleted_or_removed(post.community_id, context.pool()).await?;
 
-    check_person_block(local_user_view.person.id, post.creator_id, context.pool()).await?;
-
     let like_form = PostLikeForm {
       post_id: data.post_id,
       person_id: local_user_view.person.id,
index b2be92e5afc3174fefd17ff62996e78d896ea59d..41b18ef93ef2527a95c6b8045b63350add59c683 100644 (file)
@@ -161,7 +161,7 @@ where
   #[allow(clippy::to_string_in_display)]
   fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
     // Use to_string here because Url.display is not useful for us
-    write!(f, "{}", self.0.to_string())
+    write!(f, "{}", self.0)
   }
 }
 
index eaa1041fe161fb482e42912966396806ec1135a0..7b668d7ebee0f61baa4d548bd43b6ff964de8825 100644 (file)
@@ -97,11 +97,7 @@ async fn get_feed_data(
   let mut channel_builder = ChannelBuilder::default();
   channel_builder
     .namespaces(RSS_NAMESPACE.to_owned())
-    .title(&format!(
-      "{} - {}",
-      site_view.site.name,
-      listing_type.to_string()
-    ))
+    .title(&format!("{} - {}", site_view.site.name, listing_type))
     .link(context.settings().get_protocol_and_hostname())
     .items(items);