Merge pull request #7294 from annando/public-dfrn

Fix receiving of DFRN posts with public envelope
This commit is contained in:
Hypolite Petovan 2019-06-22 03:28:51 -04:00 committed by GitHub
commit c86c43db31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -190,13 +190,13 @@ function dfrn_dispatch_public($postdata)
} }
// Fetch the corresponding public contact // Fetch the corresponding public contact
$contact = Contact::getDetailsByAddr($msg['author'], 0); $contact_id = Contact::getIdForURL($msg['author']);
if (!$contact) { if (empty($contact_id)) {
Logger::log('Contact not found for address ' . $msg['author']); Logger::log('Contact not found for address ' . $msg['author']);
System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found'); System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found');
} }
$importer = DFRN::getImporter($contact['id']); $importer = DFRN::getImporter($contact_id);
// This should never fail // This should never fail
if (empty($importer)) { if (empty($importer)) {