]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Some corrections
[friendica.git] / src / Protocol / Diaspora.php
index 7b3b843a156bb91543e80f7a76131918190f2d8f..981abb0831defaec2816419afe5ec16b307cbc7b 100644 (file)
@@ -2969,12 +2969,10 @@ class Diaspora
                        case "StatusMessage":
                                return self::itemRetraction($importer, $contact, $data);
 
-                       case "Contact":
-                       case "Person":
-                               /// @todo What should we do with an "unshare"?
-                               // Removing the contact isn't correct since we still can read the public items
-                               Contact::remove($contact["id"]);
-                               return true;
+                       case "PollParticipation":
+                       case "Photo":
+                               // Currently unsupported
+                               break;
 
                        default:
                                logger("Unknown target type ".$target_type);
@@ -3571,8 +3569,12 @@ class Diaspora
                                $ret["root_guid"] = $guid;
                                return $ret;
                        }
+               } elseif (($guid == "") && $complete) {
+                       return false;
                }
 
+               $ret["root_guid"] = $guid;
+
                $profile = "";
                preg_match("/profile='(.*?)'/ism", $attributes, $matches);
                if ($matches[1] != "") {
@@ -3593,10 +3595,6 @@ class Diaspora
                        }
                }
 
-               if (!empty($guid)) {
-                       $ret["root_guid"] = $guid;
-               }
-
                if (empty($ret) && !$complete) {
                        return true;
                }