diff options
author | Evan Prodromou <evan@status.net> | 2010-02-19 08:31:20 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-02-19 08:31:20 -0500 |
commit | b0a75a2ab24673452674a8f296ca4dbb110bed6b (patch) | |
tree | 489012ad4a9a21850f77b3e10c206673ed1a4765 /actions/apifriendshipsdestroy.php | |
parent | 52e8aa798a23b2832a748189b42c3bc77d65c9c7 (diff) |
replace calls to subs_(un)subscribe_user with Subscription methods
Diffstat (limited to 'actions/apifriendshipsdestroy.php')
-rw-r--r-- | actions/apifriendshipsdestroy.php | 9 |
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); |