]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #4593 from annando/fix-ostatus
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 14 Mar 2018 22:46:21 +0000 (18:46 -0400)
committerGitHub <noreply@github.com>
Wed, 14 Mar 2018 22:46:21 +0000 (18:46 -0400)
OStatus: Fixed communication issues with deleted contacts

include/items.php
src/Worker/OnePoll.php

index 83aa82c940cc8d2c988b4f2009b924f397b044ed..af13898b2496d3f48d440314626a9f7b4fb37b2f 100644 (file)
@@ -228,7 +228,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
  *
  * @TODO find proper type-hints
  */
-function consume_feed($xml, $importer, &$contact, &$hub, $datedir = 0, $pass = 0) {
+function consume_feed($xml, $importer, $contact, &$hub, $datedir = 0, $pass = 0) {
        if ($contact['network'] === NETWORK_OSTATUS) {
                if ($pass < 2) {
                        // Test - remove before flight
index 42b0d9f8c4f38d876ae4bcb30d4ba32f0519e007..c1c6fdd1a8da8b2f216044bc2b2eabdcefd60e93 100644 (file)
@@ -582,11 +582,12 @@ class OnePoll
 
                        logger("Consume feed of contact ".$contact['id']);
 
-                       consume_feed($xml, $importer, $contact, $hub, 1, 1);
+                       consume_feed($xml, $importer, $contact, $hub);
 
-                       // do it twice. Ensures that children of parents which may be later in the stream aren't tossed
-
-                       consume_feed($xml, $importer, $contact, $hub, 1, 2);
+                       // do it a second time for DFRN so that any children find their parents.
+                       if ($contact['network'] === NETWORK_DFRN) {
+                               consume_feed($xml, $importer, $contact, $hub);
+                       }
 
                        $hubmode = 'subscribe';
                        if ($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) {