]> git.mxchange.org Git - friendica.git/commitdiff
When refreshing the fcontact, the returned array was incomplete
authorMichael <heluecht@pirati.ca>
Thu, 22 Feb 2018 09:59:21 +0000 (09:59 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 22 Feb 2018 09:59:21 +0000 (09:59 +0000)
src/Protocol/Diaspora.php

index 2efde817e8ab3d83b720ef1cb146fd8490f454b3..1578edb92053058da6d6d4d3cb07e1382d3f8302 100644 (file)
@@ -826,7 +826,12 @@ class Diaspora
                        // if Diaspora connectivity is enabled on their server
                        if ($r && ($r["network"] === NETWORK_DIASPORA)) {
                                self::addFContact($r, $update);
-                               $person = $r;
+
+                               // Fetch the updated or added contact
+                               $person = dba::selectFirst('fcontact', [], ['network' => NETWORK_DIASPORA, 'addr' => $handle]);
+                               if (!DBM::is_result($person)) {
+                                       $person = $r;
+                               }
                        }
                }