From: Hypolite Petovan Date: Sat, 2 Oct 2021 19:48:52 +0000 (-0400) Subject: Remove contact record instead of setting rel = 0 in Contact::revokeFollow X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b0d8136b008d17bf9e3579338633c8e3abcfdced;p=friendica.git Remove contact record instead of setting rel = 0 in Contact::revokeFollow --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index bfbeb90024..faad2adc78 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -872,7 +872,11 @@ class Contact // A null value here means the remote network doesn't support explicit follow revocation, we can still // break the locally recorded relationship if ($result !== false) { - DBA::update('contact', ['rel' => $contact['rel'] == self::FRIEND ? self::SHARING : self::NOTHING], ['id' => $contact['id']]); + if ($contact['rel'] == self::FRIEND) { + self::update(['rel' => self::SHARING], ['id' => $contact['id']]); + } else { + self::remove($contact['id']); + } } return $result;