Merge pull request #10643 from annando/notices

Avoid notices
This commit is contained in:
Hypolite Petovan 2021-08-30 11:39:47 -04:00 committed by GitHub
commit 0448070069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View 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;
}

View 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)