Changeset 9876953


Ignore:
Timestamp:
Dec 19, 2009, 6:43:15 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
5214546
Parents:
c78d06f
git-author:
Nelson Elhage <nelhage@mit.edu> (12/19/09 18:42:49)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/19/09 18:43:15)
Message:
Use home_timeline so we get retweets
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/BarnOwl/Module/Twitter/Handle.pm

    rc78d06f r9876953  
    1515
    1616use Net::Twitter::Lite;
     17BEGIN {
     18    # Backwards compatibility with version of Net::Twitter::Lite that
     19    # lack home_timeline.
     20    if(!defined(*Net::Twitter::Lite::home_timeline{CODE})) {
     21        *Net::Twitter::Lite::home_timeline =
     22          \&Net::Twitter::Lite::friends_timeline;
     23    }
     24}
    1725use HTML::Entities;
    1826
     
    6977    $self->{twitter}  = Net::Twitter::Lite->new(%twitter_args);
    7078
    71     my $timeline = eval { $self->{twitter}->friends_timeline({count => 1}) };
     79    my $timeline = eval { $self->{twitter}->home_timeline({count => 1}) };
    7280    warn "$@" if $@;
    7381
     
    151159    return unless BarnOwl::getvar('twitter:poll') eq 'on';
    152160
    153     my $timeline = eval { $self->{twitter}->friends_timeline( { since_id => $self->{last_id} } ) };
     161    my $timeline = eval { $self->{twitter}->home_timeline( { since_id => $self->{last_id} } ) };
    154162    warn "$@" if $@;
    155163    unless(defined($timeline) && ref($timeline) eq 'ARRAY') {
Note: See TracChangeset for help on using the changeset viewer.