From e151a2dc41f4000d9fc48a8e01c42f7be6ac0ccc Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 12 Jul 2021 06:25:48 +0000 Subject: [PATCH 1/2] Fixes "Undefined index: nick" --- src/Model/Contact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index a92a901cf..0e3de02d6 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2211,10 +2211,10 @@ class Contact } if ((!empty($ret['addr']) && ($ret['addr'] != $contact['addr'])) || (!empty($ret['alias']) && ($ret['alias'] != $contact['alias']))) { - $ret['uri-date'] = DateTimeFormat::utcNow(); + $ret['uri-date'] = $updated; } - if (($ret['name'] != $contact['name']) || ($ret['nick'] != $contact['nick'])) { + if ((!empty($ret['name']) && ($ret['name'] != $contact['name'])) || (!empty($ret['nick']) && ($ret['nick'] != $contact['nick']))) { $ret['name-date'] = $updated; } From 002df6e8d1246a81ac60ac33ae31b7e7cb9da7a6 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 12 Jul 2021 07:02:01 +0000 Subject: [PATCH 2/2] Fix Uncaught TypeError: Argument 1 passed to Friendica\Model\Item::storeForUserByUriId() --- src/Worker/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index e31141ea4..60ae65385 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -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']);