From 510032444f7d8f51a196b0b20792ebcc21a883e0 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 6 Oct 2018 08:51:52 +0000 Subject: [PATCH] The owner of a "like" should be the author --- src/Model/Item.php | 4 ++-- src/Protocol/Diaspora.php | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 19ab371d7c..f2d4a89815 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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, diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 551971e504..b5ecfcefcc 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -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); -- 2.39.5