Don't degrade an existing relationship when following again

pull/10896/head
Michael 2021-10-19 02:05:04 +00:00
parent 235eab0d99
commit b152fde9d1
1 changed files with 1 additions and 1 deletions

View File

@ -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']]);