Ignore:
Timestamp:
Sep 20, 2011, 11:15:32 PM (13 years ago)
Author:
Edward Z. Yang <ezyang@mit.edu>
Branches:
master, release-1.10, release-1.9
Children:
7cb2830
Parents:
fb06a17
git-author:
Edward Z. Yang <ezyang@mit.edu> (06/23/11 22:48:57)
git-committer:
Edward Z. Yang <ezyang@mit.edu> (09/20/11 23:15:32)
Message:
Remove extra spaces round parentheses.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Facebook/lib/BarnOwl/Module/Facebook/Handle.pm

    rfb06a17 ra7ac83a  
    111111    bless($self, $class);
    112112
    113     $self->{facebook} = Facebook::Graph->new( app_id => $app_id );
    114     if ( defined $self->{cfg}->{token} ) {
     113    $self->{facebook} = Facebook::Graph->new(app_id => $app_id);
     114    if (defined $self->{cfg}->{token}) {
    115115        $self->facebook_do_auth;
    116116    }
     
    190190    $self->{friends} = {};
    191191
    192     for my $friend ( @{$friends->{data}} ) {
     192    for my $friend (@{$friends->{data}}) {
    193193        if (defined $self->{friends}{$friend->{name}}) {
    194194            # XXX We should try a little harder here, rather than just
     
    250250             # Not using this, because we want to pick up comment
    251251             # updates. We need to manually de-duplicate, though.
    252              # ->where_since( "@" . $self->{last_poll} )
     252             # ->where_since("@" . $self->{last_poll})
    253253             # Facebook doesn't actually give us that many results.
    254254             # But it can't hurt to ask!
    255              ->limit_results( 200 )
     255             ->limit_results(200)
    256256             ->request
    257257             ->as_hashref
     
    260260
    261261    my $new_last_poll = $self->{last_poll};
    262     for my $post ( reverse @{$updates->{data}} ) {
     262    for my $post (reverse @{$updates->{data}}) {
    263263        # No app invites, thanks! (XXX make configurable)
    264264        if ($post->{type} eq 'link' && $post->{application}) {
     
    317317        my $updated_time = str2time($post->{updated_time});
    318318        if ($updated_time >= $self->{last_poll} && defined $post->{comments}{data}) {
    319             for my $comment ( @{$post->{comments}{data}} ) {
     319            for my $comment (@{$post->{comments}{data}}) {
    320320                my $comment_time = str2time($comment->{created_time});
    321321                if ($comment_time < $self->{last_poll}) {
     
    377377    if (defined $user) {
    378378        $user = $self->{friends}{$user} || $user;
    379         eval { $self->{facebook}->add_post( $user )->set_message( $msg )->publish; };
     379        eval { $self->{facebook}->add_post($user)->set_message($msg)->publish; };
    380380        return unless $self->check_result;
    381381    } else {
    382         eval { $self->{facebook}->add_post->set_message( $msg )->publish; };
     382        eval { $self->{facebook}->add_post->set_message($msg)->publish; };
    383383        return unless $self->check_result;
    384384    }
     
    392392    my $msg = shift;
    393393
    394     eval { $self->{facebook}->add_comment( $post_id )->set_message( $msg )->publish; };
     394    eval { $self->{facebook}->add_comment($post_id)->set_message($msg)->publish; };
    395395    return unless $self->check_result;
    396396    $self->sleep(0);
     
    424424sub facebook_do_auth {
    425425    my $self = shift;
    426     if ( ! defined $self->{cfg}->{token} ) {
     426    if (!defined $self->{cfg}->{token}) {
    427427        BarnOwl::admin_message('Facebook', "Login to Facebook at ".$self->{login_url}
    428428            . "\nand run command ':facebook-auth URL' with the URL you are redirected to."
Note: See TracChangeset for help on using the changeset viewer.