From: Michael Date: Sun, 7 Jan 2018 12:10:31 +0000 (+0000) Subject: We have to check for the contact`s uid not the item`s uid X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=708d034c6de330a7b3d2d3f3138cd139fdd3f69f;p=friendica.git We have to check for the contact`s uid not the item`s uid --- diff --git a/include/enotify.php b/include/enotify.php index bccc5a9bed..13298ce76c 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -653,7 +653,9 @@ function notification($params) */ function check_user_notification($itemid) { // fetch all users in the thread - $users = dba::p("SELECT DISTINCT(`uid`) FROM `item` WHERE `parent` IN (SELECT `parent` FROM `item` WHERE `id`=?) AND `uid` != 0", $itemid); + $users = dba::p("SELECT DISTINCT(`contact`.`uid`) FROM `item` + INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND `contact`.`uid` != 0 + WHERE `parent` IN (SELECT `parent` FROM `item` WHERE `id`=?)", $itemid); while ($user = dba::fetch($users)) { check_item_notification($itemid, $user['uid']); }