Ignore:
Timestamp:
Jul 21, 2009, 9:27:32 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
7430aa4
Parents:
f93b81b
git-author:
Kevin Riggle <kevinr@free-dissociation.com> (07/21/09 21:27:02)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/21/09 21:27:32)
Message:
Multiple account support

Accounts are specified as a list of hashes in the ~/.owl/twitter file.

Adds 'poll_for_tweets', 'poll_for_dms', 'publish_tweets', 'default_sender',
and 'account_nickname' options to the twitter account hashes.  They do about
what they say on the tin.

Add arguments to :twitter, :twitter-direct, and :twitter-atreply to specify
the service to use (by nickname), with sane defaults, plus documentation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/BarnOwl/Message/Twitter.pm

    ra0385ad3 r159aaad  
    1616sub subcontext {undef}
    1717sub service { return (shift->{"service"} || "http://twitter.com"); }
     18sub account { return shift->{"account"}; }
    1819sub long_sender {
    1920    my $self = shift;
     
    2829        return $self->replysendercmd;
    2930    } elsif(exists($self->{status_id})) {
    30         return 'twitter-atreply ' . $self->sender . " " . $self->{status_id};
     31        return 'twitter-atreply ' . $self->sender . " " . $self->{status_id} . " " . $self->account;
    3132    } else {
    32         return 'twitter-atreply ' . $self->sender;
     33        return 'twitter-atreply ' . $self->sender . " " . $self->account;
    3334    }
    3435}
     
    3637sub replysendercmd {
    3738    my $self = shift;
    38     return 'twitter-direct ' . $self->sender;
     39    return 'twitter-direct ' . $self->sender . " " . $self->account;
    3940}
    4041
Note: See TracChangeset for help on using the changeset viewer.