From bcadf19289ca9a5d94f1442e6d0d6780f8c39029 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 2 Aug 2019 17:17:51 +0000 Subject: [PATCH] "contact-id" has to be set, after "author-id" had been set --- src/Model/Item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 01c2c3459d..de500bd56d 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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}.', [