From 3824ad5590bff2062fede2c7a2748dc5ad508383 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 7 Dec 2017 19:39:55 +0000 Subject: [PATCH 1/2] Possible fix for issue 4013 --- src/Protocol/Diaspora.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index cd4e5b6f0e..7317d8129e 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -992,7 +992,7 @@ class Diaspora * That makes us friends. * Normally this should have handled by getting a request - but this could get lost */ - if ($contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) { + if (!$is_comment && $contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) { dba::update( 'contact', array('rel' => CONTACT_IS_FRIEND, 'writable' => true), From a7b004a72707ad2f5bfa45c25c2db6db70229bde Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 7 Dec 2017 20:10:09 +0000 Subject: [PATCH 2/2] Commented out the functionality --- src/Protocol/Diaspora.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 7317d8129e..2cb5eb700b 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -992,16 +992,18 @@ class Diaspora * That makes us friends. * Normally this should have handled by getting a request - but this could get lost */ - if (!$is_comment && $contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) { - dba::update( - 'contact', - array('rel' => CONTACT_IS_FRIEND, 'writable' => true), - array('id' => $contact["id"], 'uid' => $contact["uid"]) - ); - - $contact["rel"] = CONTACT_IS_FRIEND; - logger("defining user ".$contact["nick"]." as friend"); - } + // It is deactivated by now, due to side effects. See issue https://github.com/friendica/friendica/pull/4033 + // It is not removed by now. Possibly the code is needed? + //if (!$is_comment && $contact["rel"] == CONTACT_IS_FOLLOWER && in_array($importer["page-flags"], array(PAGE_FREELOVE))) { + // dba::update( + // 'contact', + // array('rel' => CONTACT_IS_FRIEND, 'writable' => true), + // array('id' => $contact["id"], 'uid' => $contact["uid"]) + // ); + // + // $contact["rel"] = CONTACT_IS_FRIEND; + // logger("defining user ".$contact["nick"]." as friend"); + //} // We don't seem to like that person if ($contact["blocked"] || $contact["readonly"] || $contact["archive"]) {