summaryrefslogtreecommitdiff
path: root/actions/twitapifriendships.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-16 11:51:19 -0400
committerEvan Prodromou <evan@status.net>2009-09-16 11:51:19 -0400
commitaf76e05cd11bc64a43656c5d00a788dbf62c13f8 (patch)
tree7f7453ae75665c3789f4d8a4907239e700a0e3eb /actions/twitapifriendships.php
parent75085a0df17c717ad7fd08334204885c75480076 (diff)
parentc50ab7730acacd7a461e5509f7bcc259ac482a57 (diff)
Merge branch 'master' of git@gitorious.org:statusnet/mainline
Diffstat (limited to 'actions/twitapifriendships.php')
-rw-r--r--actions/twitapifriendships.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/twitapifriendships.php b/actions/twitapifriendships.php
index f2ea46910..eea8945c3 100644
--- a/actions/twitapifriendships.php
+++ b/actions/twitapifriendships.php
@@ -99,6 +99,12 @@ class TwitapifriendshipsAction extends TwitterapiAction
$other = $this->get_profile($id);
$user = $apidata['user']; // Alwyas the auth user
+ if ($user->id == $other->id) {
+ $this->clientError(_("You cannot unfollow yourself!"),
+ 403, $apidata['content-type']);
+ return;
+ }
+
$sub = new Subscription();
$sub->subscriber = $user->id;
$sub->subscribed = $other->id;