From 71c828de89d4092579470c9f2ba821ae803cb557 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 10 Apr 2010 17:52:40 -0700 Subject: Allow blocking someone who's not currently subscribed to you (prevents seeing @-replies from them, or them subbing to you in future) --- classes/User.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/User.php b/classes/User.php index 2c256301c..1928a3c62 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'); -- cgit v1.2.3