]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact.php
Merge pull request #10800 from MrPetovan/task/10739-block
[friendica.git] / src / Model / Contact.php
index bfbeb90024474132fa60320ef9955fc19eb0f274..faad2adc78c27c2cc91cfeabfc7e741752517535 100644 (file)
@@ -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;