From b152fde9d12af828429dc3b9f93df47824a26dd7 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Oct 2021 02:05:04 +0000 Subject: [PATCH] Don't degrade an existing relationship when following again --- src/Model/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 9aed40cf59..f0b6eda55e 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2462,7 +2462,7 @@ class Contact if (DBA::isResult($contact)) { // update contact - $new_relation = (($contact['rel'] == self::FOLLOWER) ? self::FRIEND : self::SHARING); + $new_relation = (in_array($contact['rel'], [self::FOLLOWER, self::FRIEND]) ? self::FRIEND : self::SHARING); $fields = ['rel' => $new_relation, 'subhub' => $subhub, 'readonly' => false]; self::update($fields, ['id' => $contact['id']]);