From cef7af8fba284e90d8e789f685a754e036914587 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 31 Aug 2020 19:27:50 +0000 Subject: [PATCH] Don't notify on own entries --- include/enotify.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/enotify.php b/include/enotify.php index e89857b404..e8e1357449 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -645,6 +645,11 @@ function check_item_notification($itemid, $uid, $notification_type) { if ($item['gravity'] == GRAVITY_ACTIVITY) { $parent_item = Item::selectFirst($fields, ['uri-id' => $item['thr-parent-id'], 'uid' => [$uid, 0]]); if (DBA::isResult($parent_item)) { + // Don't notify on own entries + if (User::getIdForURL($parent_item['author-link']) == $uid) { + return false; + } + $params['origin_name'] = $parent_item['author-name']; $params['origin_link'] = $parent_item['author-link']; $params['origin_photo'] = $parent_item['author-avatar'];