]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Fix error / "about" is now converted to BBCode
[friendica.git] / src / Protocol / Diaspora.php
index 27cfdccd853af83b89d026ddaf6fb5e741e25605..551971e504f2e74b090a3226f5cd5f64e5aa5dc0 100644 (file)
@@ -1592,17 +1592,13 @@ class Diaspora
                if (DBA::isResult($item)) {
                        return $item["uri"];
                } elseif (!$onlyfound) {
-                       $contact = Contact::getDetailsByAddr($author, 0);
-                       if (!empty($contact['network'])) {
-                               $prefix = 'urn:X-' . $contact['network'] . ':';
-                       } else {
-                               // This fallback should happen most unlikely
-                               $prefix = 'urn:X-dspr:';
-                       }
+                       $person = self::personByHandle($author);
 
-                       $author_parts = explode('@', $author);
+                       $parts = parse_url($person['url']);
+                       unset($parts['path']);
+                       $host_url = Network::unparseURL($parts);
 
-                       return $prefix . $author_parts[1] . ':' . $author_parts[0] . ':'. $guid;
+                       return $host_url . '/objects/' . $guid;
                }
 
                return "";
@@ -3204,7 +3200,7 @@ class Diaspora
                $author = self::myHandle($owner);
 
                $message = ["author" => $author,
-                               "guid" => System::createGUID(32),
+                               "guid" => System::createUUID(),
                                "parent_type" => "Post",
                                "parent_guid" => $item["guid"]];