Merge pull request #8883 from annando/replace-getdetails

Replaced "getDetailsByURL" with "getByURL/getByURLForUser"
This commit is contained in:
Hypolite Petovan 2020-07-15 13:49:27 -04:00 committed by GitHub
commit 631095eefd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 84 additions and 291 deletions

View file

@ -1569,7 +1569,7 @@ class Diaspora
*/
private static function plink($addr, $guid, $parent_guid = '')
{
$contact = Contact::getDetailsByAddr($addr);
$contact = Contact::getByURL($addr);
if (empty($contact)) {
Logger::info('No contact data for address', ['addr' => $addr]);
return '';
@ -3730,7 +3730,7 @@ class Diaspora
private static function prependParentAuthorMention($body, $profile_url)
{
$profile = Contact::getDetailsByURL($profile_url);
$profile = Contact::getByURL($profile_url, false, ['addr', 'name', 'contact-type']);
if (!empty($profile['addr'])
&& $profile['contact-type'] != Contact::TYPE_COMMUNITY
&& !strstr($body, $profile['addr'])