Fix Uncaught TypeError: Argument 1 passed to Friendica\Model\Item::storeForUserByUriId()

This commit is contained in:
Michael 2021-07-12 07:02:01 +00:00
parent 07ef1edfd6
commit 002df6e8d1

View File

@ -534,7 +534,7 @@ class Notifier
foreach ($contacts as $contact) { foreach ($contacts as $contact) {
// Direct delivery of local contacts // Direct delivery of local contacts
if ($target_uid = User::getIdForURL($contact['url'])) { if (!in_array($cmd, [Delivery::RELOCATION, Delivery::SUGGESTION, Delivery::DELETION, Delivery::MAIL]) && $target_uid = User::getIdForURL($contact['url'])) {
Logger::info('Direct delivery', ['uri-id' => $target_item['uri-id'], 'target' => $target_uid]); Logger::info('Direct delivery', ['uri-id' => $target_item['uri-id'], 'target' => $target_uid]);
$fields = ['protocol' => Conversation::PARCEL_LOCAL_DFRN, 'direction' => Conversation::PUSH]; $fields = ['protocol' => Conversation::PARCEL_LOCAL_DFRN, 'direction' => Conversation::PUSH];
Item::storeForUserByUriId($target_item['uri-id'], $target_uid, $fields, $target_item['uid']); Item::storeForUserByUriId($target_item['uri-id'], $target_uid, $fields, $target_item['uid']);