]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
The owner of a "like" should be the author
[friendica.git] / src / Protocol / Diaspora.php
index 5239255fee83eb2c2f46f1a33d0f52150aeccc77..b5ecfcefcc9d16f1b934fdd7d8d87e735249e1b2 100644 (file)
@@ -1598,7 +1598,7 @@ class Diaspora
                        unset($parts['path']);
                        $host_url = Network::unparseURL($parts);
 
-                       return $host_url . '/object/' . $guid;
+                       return $host_url . '/objects/' . $guid;
                }
 
                return "";
@@ -1969,11 +1969,8 @@ class Diaspora
                $datarray["contact-id"] = $author_contact["cid"];
                $datarray["network"]  = $author_contact["network"];
 
-               $datarray["author-link"] = $person["url"];
-               $datarray["author-id"] = Contact::getIdForURL($person["url"], 0);
-
-               $datarray["owner-link"] = $contact["url"];
-               $datarray["owner-id"] = Contact::getIdForURL($contact["url"], 0);
+               $datarray["owner-link"] = $datarray["author-link"] = $person["url"];
+               $datarray["owner-id"] = $datarray["author-id"] = Contact::getIdForURL($person["url"], 0);
 
                $datarray["guid"] = $guid;
                $datarray["uri"] = self::getUriFromGuid($author, $guid);
@@ -3200,7 +3197,7 @@ class Diaspora
                $author = self::myHandle($owner);
 
                $message = ["author" => $author,
-                               "guid" => System::UUID(),
+                               "guid" => System::createUUID(),
                                "parent_type" => "Post",
                                "parent_guid" => $item["guid"]];