From b0d8136b008d17bf9e3579338633c8e3abcfdced Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 2 Oct 2021 15:48:52 -0400 Subject: [PATCH] Remove contact record instead of setting rel = 0 in Contact::revokeFollow --- src/Model/Contact.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;