From 5899b89ef2ee4fd2bce972ee890cd3e7d2554c20 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 18 Mar 2021 10:59:17 -0400 Subject: [PATCH] Adding some comments to notifs. --- crates/api_structs/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/api_structs/src/lib.rs b/crates/api_structs/src/lib.rs index ea3a05566..462f521b4 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);