]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User.php
Allow blocking someone who's not currently subscribed to you (prevents seeing @-repli...
[quix0rs-gnu-social.git] / classes / User.php
index 2c256301c2f2d94a1cc36f4b079e9dd71b4352fc..1928a3c62fb1735b1c9ecab9a01595f6064ca191 100644 (file)
@@ -548,7 +548,10 @@ class User extends Memcached_DataObject
             return false;
         }
 
-        Subscription::cancel($other, $this->getProfile());
+        $self = $this->getProfile();
+        if (Subscription::exists($other, $self)) {
+            Subscription::cancel($other, $self);
+        }
 
         $block->query('COMMIT');