Improved PR 7452: We now respect the "self" contact

This commit is contained in:
Michael 2019-08-02 16:46:26 +00:00
parent e9f0c4dbfb
commit 418009ffea

View File

@ -1234,7 +1234,9 @@ class Item extends BaseObject
private static function contactId($item)
{
if (!empty($item['uid']) && !Contact::isSharing($item['author-id'], $item['uid'])) {
if (!empty($item['contact-id']) && DBA::exists('contact', ['self' => true, 'id' => $item['contact-id']])) {
return $item['contact-id'];
} elseif (!empty($item['uid']) && !Contact::isSharing($item['author-id'], $item['uid'])) {
return $item['author-id'];
} elseif (!empty($item['contact-id'])) {
return $item['contact-id'];