Merge pull request #8044 from annando/contact-adding

Don't add contacts when not needed
This commit is contained in:
Philipp 2020-01-01 20:38:34 +01:00 committed by GitHub
commit 75c74e8562
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 52 additions and 19 deletions

View file

@ -1131,12 +1131,6 @@ class Diaspora
private static function contactByHandle($uid, $handle)
{
$cid = Contact::getIdForURL($handle, $uid);
if (!$cid) {
$handle_parts = explode("@", $handle);
$nurl_sql = "%%://" . $handle_parts[1] . "%%/profile/" . $handle_parts[0];
$cid = Contact::getIdForURL($nurl_sql, $uid);
}
if (!$cid) {
Logger::log("Haven't found a contact for user " . $uid . " and handle " . $handle, Logger::DEBUG);
return false;