]> git.mxchange.org Git - friendica.git/commitdiff
The owner of a "like" should be the author
authorMichael <heluecht@pirati.ca>
Sat, 6 Oct 2018 08:51:52 +0000 (08:51 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 6 Oct 2018 08:51:52 +0000 (08:51 +0000)
src/Model/Item.php
src/Protocol/Diaspora.php

index 19ab371d7c0f9581f86e0709fa45e12f81c5bdfc..f2d4a8981575b12631f3833eb078f695f3a0b445 100644 (file)
@@ -3111,7 +3111,7 @@ class Item extends BaseObject
                        return true;
                }
 
-               $objtype = $item['resource-id'] ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ;
+               $objtype = $item['resource-id'] ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE;
 
                $new_item = [
                        'guid'          => System::createUUID(),
@@ -3125,7 +3125,7 @@ class Item extends BaseObject
                        'parent'        => $item['id'],
                        'parent-uri'    => $item['uri'],
                        'thr-parent'    => $item['uri'],
-                       'owner-id'      => $item['owner-id'],
+                       'owner-id'      => $author_id,
                        'author-id'     => $author_id,
                        'body'          => $activity,
                        'verb'          => $activity,
index 551971e504f2e74b090a3226f5cd5f64e5aa5dc0..b5ecfcefcc9d16f1b934fdd7d8d87e735249e1b2 100644 (file)
@@ -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);