]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Allow blocking someone who's not currently subscribed to you (prevents seeing @-repli...
authorBrion Vibber <brion@pobox.com>
Sun, 11 Apr 2010 00:52:40 +0000 (17:52 -0700)
committerBrion Vibber <brion@pobox.com>
Sun, 11 Apr 2010 00:52:40 +0000 (17:52 -0700)
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');