]> git.mxchange.org Git - friendica.git/commitdiff
Avoid notices
authorMichael <heluecht@pirati.ca>
Mon, 30 Aug 2021 12:29:09 +0000 (12:29 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 30 Aug 2021 12:29:09 +0000 (12:29 +0000)
src/Model/Contact.php
src/Protocol/ActivityPub/Transmitter.php

index b59e7c2b50949345922b2824a2198315f3eb267c..93e745456a7590cb8f50258b28bda0cf4e70412d 100644 (file)
@@ -2102,7 +2102,7 @@ class Contact
                $updated = DateTimeFormat::utcNow();
 
                if (Strings::normaliseLink($contact['url']) != Strings::normaliseLink($ret['url'])) {
-                       Logger::notice('New URL differs from old URL', ['id' => $id, 'uid' => $contact['uid'], 'old' => $contact['url'], 'new' => $ret['url']]);
+                       Logger::notice('New URL differs from old URL', ['id' => $id, 'uid' => $uid, 'old' => $contact['url'], 'new' => $ret['url']]);
                        self::updateContact($id, $uid, $contact['url'], $ret['url'], ['failed' => true, 'last-update' => $updated, 'failure_update' => $updated]);
                        return false;
                }
index ab23f81d84da03c77bb6e4676c3ad8df9b1562eb..bd43eea04893a796deb4b57afea4930f54598f8a 100644 (file)
@@ -877,6 +877,9 @@ class Transmitter
                }
 
                $reply = DBA::selectFirst('mail', ['uri', 'uri-id', 'from-url'], ['parent-uri' => $mail['parent-uri'], 'reply' => false]);
+               if (!DBA::isResult($reply)) {
+                       $reply = $mail;
+               }
 
                // Making the post more compatible for Mastodon by:
                // - Making it a note and not an article (no title)