]> git.mxchange.org Git - friendica.git/commitdiff
Fix Uncaught TypeError: Argument 1 passed to Friendica\Model\Item::storeForUserByUriId()
authorMichael <heluecht@pirati.ca>
Mon, 12 Jul 2021 07:02:01 +0000 (07:02 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 12 Jul 2021 07:02:01 +0000 (07:02 +0000)
src/Worker/Notifier.php

index e31141ea46bcd8bac3237a0b8f4c80f8123561fc..60ae65385520763d98463b7fb5bf26dac6f21a04 100644 (file)
@@ -534,7 +534,7 @@ class Notifier
 
                foreach ($contacts as $contact) {
                        // 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]);
                                $fields = ['protocol' => Conversation::PARCEL_LOCAL_DFRN, 'direction' => Conversation::PUSH];
                                Item::storeForUserByUriId($target_item['uri-id'], $target_uid, $fields, $target_item['uid']);