summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-04-10 17:52:40 -0700
committerBrion Vibber <brion@pobox.com>2010-04-10 17:52:40 -0700
commit71c828de89d4092579470c9f2ba821ae803cb557 (patch)
treece3253e924f6c5ad545b8650d55f1e98ca30db51 /classes
parent5d96cf2eec15dc08af5c539be53b427c50ef89a9 (diff)
Allow blocking someone who's not currently subscribed to you (prevents seeing @-replies from them, or them subbing to you in future)
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php5
1 files changed, 4 insertions, 1 deletions
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');