]> git.mxchange.org Git - friendica.git/commitdiff
Improved PR 7452: We now respect the "self" contact
authorMichael <heluecht@pirati.ca>
Fri, 2 Aug 2019 16:46:26 +0000 (16:46 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 2 Aug 2019 16:46:26 +0000 (16:46 +0000)
src/Model/Item.php

index 248e646afcd3a6ed8b545809f6205a69e56d2233..ef461fe65285a1a25af112fd330f7107dd03a388 100644 (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'];