summaryrefslogtreecommitdiff
path: root/actions/apifriendshipsdestroy.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-21 11:12:56 -0800
committerBrion Vibber <brion@pobox.com>2010-02-21 11:12:56 -0800
commit85528ccb1f5840a8c73f6c939f12d98bb3680cde (patch)
treebe0f09c02a2bf003c23d6be98919783347b9786d /actions/apifriendshipsdestroy.php
parent86f2f530ef60fdb601720885d493cf5b2a446e6b (diff)
parent3e7a2a4014dd93637f5a666e238dde13e397523c (diff)
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/apifriendshipsdestroy.php')
-rw-r--r--actions/apifriendshipsdestroy.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/actions/apifriendshipsdestroy.php b/actions/apifriendshipsdestroy.php
index 91c6fd032..d48a57756 100644
--- a/actions/apifriendshipsdestroy.php
+++ b/actions/apifriendshipsdestroy.php
@@ -124,12 +124,9 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
return;
}
- $result = subs_unsubscribe_user($this->user, $this->other->nickname);
-
- if (is_string($result)) {
- $this->clientError($result, 403, $this->format);
- return;
- }
+ // throws an exception on error
+ Subscription::cancel($this->user->getProfile(),
+ $this->other->getProfile());
$this->initDocument($this->format);
$this->showProfile($this->other, $this->format);