From: Dessalines Date: Thu, 18 Mar 2021 14:59:17 +0000 (-0400) Subject: Adding some comments to notifs. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/sneer-club-logo.svg?a=commitdiff_plain;h=5899b89ef2ee4fd2bce972ee890cd3e7d2554c20;p=lemmy.git Adding some comments to notifs. --- diff --git a/crates/api_structs/src/lib.rs b/crates/api_structs/src/lib.rs index ea3a0556..462f521b 100644 --- a/crates/api_structs/src/lib.rs +++ b/crates/api_structs/src/lib.rs @@ -116,7 +116,9 @@ fn do_send_local_notifs( match comment.parent_id { Some(parent_id) => { if let Ok(parent_comment) = Comment::read(&conn, parent_id) { + // Don't send a notif to yourself if parent_comment.creator_id != person.id { + // Get the parent commenter local_user if let Ok(parent_user_view) = LocalUserView::read_person(&conn, parent_comment.creator_id) { recipient_ids.push(parent_user_view.local_user.id);