From: Brion Vibber Date: Sun, 11 Apr 2010 00:52:40 +0000 (-0700) Subject: Allow blocking someone who's not currently subscribed to you (prevents seeing @-repli... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=71c828de89d4092579470c9f2ba821ae803cb557;p=quix0rs-gnu-social.git Allow blocking someone who's not currently subscribed to you (prevents seeing @-replies from them, or them subbing to you in future) --- diff --git a/classes/User.php b/classes/User.php index 2c256301c2..1928a3c62f 100644 --- a/classes/User.php +++ b/classes/User.php @@ -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');