]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Fetch the receiver from the parent posting as well
[friendica.git] / src / Protocol / Diaspora.php
index 27cfdccd853af83b89d026ddaf6fb5e741e25605..e7edcdc490a9363d693d502bec5d29df73006af1 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 . '/object/' . $guid;
                }
 
                return "";