Browse Source

Merge pull request #5839 from annando/like-owner

The owner of a "like" should be the author
tags/2019.01
Tobias Diekershoff GitHub 1 year ago
parent
commit
5014779052
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions
  1. +2
    -2
      src/Model/Item.php
  2. +2
    -5
      src/Protocol/Diaspora.php

+ 2
- 2
src/Model/Item.php View 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,


+ 2
- 5
src/Protocol/Diaspora.php View 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);


Loading…
Cancel
Save