mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 14:21:19 +00:00
Adding some comments to notifs.
This commit is contained in:
parent
99e5a4d1c3
commit
5899b89ef2
1 changed files with 2 additions and 0 deletions
|
@ -116,7 +116,9 @@ fn do_send_local_notifs(
|
||||||
match comment.parent_id {
|
match comment.parent_id {
|
||||||
Some(parent_id) => {
|
Some(parent_id) => {
|
||||||
if let Ok(parent_comment) = Comment::read(&conn, 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 {
|
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)
|
if let Ok(parent_user_view) = LocalUserView::read_person(&conn, parent_comment.creator_id)
|
||||||
{
|
{
|
||||||
recipient_ids.push(parent_user_view.local_user.id);
|
recipient_ids.push(parent_user_view.local_user.id);
|
||||||
|
|
Loading…
Reference in a new issue