]> git.mxchange.org Git - friendica.git/commitdiff
"contact-id" has to be set, after "author-id" had been set
authorMichael <heluecht@pirati.ca>
Fri, 2 Aug 2019 17:17:51 +0000 (17:17 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 2 Aug 2019 17:17:51 +0000 (17:17 +0000)
src/Model/Item.php

index 01c2c3459d848cb8288c6eaa5851653ef1de04cc..de500bd56d2fe8adaf30bd441bd64b9cb86fa9d1 100644 (file)
@@ -1471,9 +1471,6 @@ class Item extends BaseObject
 
                $item['plink'] = defaults($item, 'plink', System::baseUrl() . '/display/' . urlencode($item['guid']));
 
-               // The contact-id should be set before "self::insert" was called - but there seems to be issues sometimes
-               $item["contact-id"] = self::contactId($item);
-
                $default = ['url' => $item['author-link'], 'name' => $item['author-name'],
                        'photo' => $item['author-avatar'], 'network' => $item['network']];
 
@@ -1529,6 +1526,9 @@ class Item extends BaseObject
                unset($item['causer-id']);
                unset($item['causer-link']);
 
+               // The contact-id should be set before "self::insert" was called - but there seems to be issues sometimes
+               $item["contact-id"] = self::contactId($item);
+
                if ($item['network'] == Protocol::PHANTOM) {
                        $item['network'] = Protocol::DFRN;
                        Logger::notice('Missing network, setting to {network}.', [