Subject: | captcha -- anonymous request blocking |
Hi Grant,
I've noticed today that some friend requests are blocked by people who
only wish to add people that they know. This patch sends a slightly
different error code + message for those cases. The benefit is that
with the new message you can opt to continue adding friends without
going to myspace to deal with someone you don't know anyway. Here's the
patch, made against the latest release, so I hope it doesn't cause
conflicts with that other patch. Note to self: stop sending patches. :)
25a26
Show quoted text
> use Contextual::Return;
2122c2123
< FP => 'Failed, you already have a pending
friend request for this person',
---
Show quoted text> FP => 'Failed, you already have a pending
friend request for this person.',
2123a2125
Show quoted text> FB => 'Failed, CAPTCHA response requested.
Anonymous requests blocked.',
2164a2167,2171
Show quoted text> # Check for anonymous blocking CAPTCHA
> elsif ( $page =~ /only accepts add requests from
people he\/she knows/ ) {
Show quoted text> $return_code = 'FB';
> }
>
2171c2178,2181
< return $return_code, $status_codes{$return_code};
---
Show quoted text> return (
> LIST { $return_code, $status_codes{$return_code} }
> STR { $return_code }
> );