]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/DFRN.php
Fix message "empty network" in gcontact::getid
[friendica.git] / src / Protocol / DFRN.php
index 54e44f5b9959dddf00029e89fb69ebb35a852266..95780bec7010ae76da26330fa3e6c73e2d3384cf 100644 (file)
@@ -960,7 +960,7 @@ class DFRN
                $dfrnowner = self::addEntryAuthor($doc, "dfrn:owner", $item["owner-link"], $item);
                $entry->appendChild($dfrnowner);
 
-               if (($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) {
+               if ($item['gravity'] != GRAVITY_PARENT) {
                        $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
                        $parent = Item::selectFirst(['guid', 'plink'], ['uri' => $parent_item, 'uid' => $item['uid']]);
                        $attributes = ["ref" => $parent_item, "type" => "text/html",
@@ -1341,7 +1341,7 @@ class DFRN
                }
 
 
-               Logger::log('dfrn_deliver: ' . "SENDING: " . print_r($postvars, true), Logger::DATA);
+               Logger::debug('dfrn_deliver', ['post' => $postvars]);
 
                $postResult = Network::post($contact['notify'], $postvars);
 
@@ -1560,7 +1560,7 @@ class DFRN
                if (DBA::isResult($contact_old) && !$onlyfetch) {
                        Logger::log("Check if contact details for contact " . $contact_old["id"] . " (" . $contact_old["nick"] . ") have to be updated.", Logger::DEBUG);
 
-                       $poco = ["url" => $contact_old["url"]];
+                       $poco = ["url" => $contact_old["url"], "network" => $contact_old["network"]];
 
                        // When was the last change to name or uri?
                        $name_element = $xpath->query($element . "/atom:name", $context)->item(0);