"contact-id" has to be set, after "author-id" had been set

2022.09-rc
Michael 2019-08-02 17:17:51 +00:00
rodzic 9819d31591
commit bcadf19289
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -1471,9 +1471,6 @@ class Item extends BaseObject
$item['plink'] = defaults($item, 'plink', System::baseUrl() . '/display/' . urlencode($item['guid'])); $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'], $default = ['url' => $item['author-link'], 'name' => $item['author-name'],
'photo' => $item['author-avatar'], 'network' => $item['network']]; 'photo' => $item['author-avatar'], 'network' => $item['network']];
@ -1529,6 +1526,9 @@ class Item extends BaseObject
unset($item['causer-id']); unset($item['causer-id']);
unset($item['causer-link']); 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) { if ($item['network'] == Protocol::PHANTOM) {
$item['network'] = Protocol::DFRN; $item['network'] = Protocol::DFRN;
Logger::notice('Missing network, setting to {network}.', [ Logger::notice('Missing network, setting to {network}.', [