Fixing liking comment on blocked person. Fixes #2033 (#2042)

webfinger-order
Dessalines 2022-01-19 09:17:18 -05:00 committed by GitHub
parent eea3308906
commit a212f6b780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 17 deletions

View 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| {

View 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,

View 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)
}
}

View 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);