]> git.mxchange.org Git - friendica.git/commitdiff
We have to check for the contact`s uid not the item`s uid
authorMichael <heluecht@pirati.ca>
Sun, 7 Jan 2018 12:10:31 +0000 (12:10 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 7 Jan 2018 12:10:31 +0000 (12:10 +0000)
include/enotify.php

index bccc5a9bed8af57abec531eb9c012d5e28c9fc80..13298ce76ca684b8396a261a6a00ed4a871aaf72 100644 (file)
@@ -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']);
        }