]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/UpdateContacts.php
Merge remote-tracking branch 'upstream/develop' into more-q
[friendica.git] / src / Worker / UpdateContacts.php
index ba4f9db41c8f32482c93097f79a151bc0253dee8..b5ac862bda89706833458fe6fa2b6edd43cf0eeb 100644 (file)
@@ -55,9 +55,11 @@ class UpdateContacts
                $ids = self::getContactsToUpdate($condition, [], $limit);
                Logger::info('Fetched federated user contacts', ['count' => count($ids)]);
 
-               $conditions = ["`id` IN (SELECT `author-id` FROM `post-user`)", "`id` IN (SELECT `owner-id` FROM `post-user`)", 
-                       "`id` IN (SELECT `causer-id` FROM `post-user`)", "`id` IN (SELECT `cid` FROM `post-tag`)",
-                       "`id` IN (SELECT `cid` FROM `user-contact`)"];
+               $conditions = ["`id` IN (SELECT `author-id` FROM `post` WHERE `author-id` = `contact`.`id`)",
+                       "`id` IN (SELECT `owner-id` FROM `post` WHERE `owner-id` = `contact`.`id`)",
+                       "`id` IN (SELECT `causer-id` FROM `post` WHERE `causer-id` = `contact`.`id`)",
+                       "`id` IN (SELECT `cid` FROM `post-tag` WHERE `cid` = `contact`.`id`)",
+                       "`id` IN (SELECT `cid` FROM `user-contact` WHERE `cid` = `contact`.`id`)"];
 
                foreach ($conditions as $contact_condition) {
                        $condition = DBA::mergeConditions($base_condition,