Changeset 385dd69


Ignore:
Timestamp:
Sep 14, 2009, 9:59:29 PM (11 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
e010ee0
Parents:
8462b38
git-author:
Nelson Elhage <nelhage@mit.edu> (09/14/09 21:54:20)
git-committer:
Nelson Elhage <nelhage@mit.edu> (09/14/09 21:59:29)
Message:
Rename some configuration options to be shorter.

default_sender => default
show_unsubscribed_replies => show_mentions

Accept the old names for backwards compatibility.
Location:
lib/BarnOwl/Module
Files:
2 edited

Legend:

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

    r8462b38 r385dd69  
    126126}
    127127
    128 $default_handle = first {$_->{cfg}->{default_sender}} @twitter_handles;
     128$default_handle = first {$_->{cfg}->{default}} @twitter_handles;
    129129if (!$default_handle && @twitter_handles) {
    130130    $default_handle = $twitter_handles[0];
  • lib/BarnOwl/Module/Twitter/Handle.pm

    r8462b38 r385dd69  
    3232    my $cfg = shift;
    3333
     34    my $val;
     35
     36    if(!exists $cfg->{default} &&
     37       defined($val = delete $cfg->{default_sender})) {
     38        $cfg->{default} = $val;
     39    }
     40
     41    if(!exists $cfg->{show_mentions} &&
     42       defined($val = delete $cfg->{show_unsubscribed_replies})) {
     43        $cfg->{show_mentions} = $val;
     44    }
     45
    3446    $cfg = {
    3547        account_nickname => '',
    36         default_sender   => 0,
     48        default          => 0,
    3749        poll_for_tweets  => 1,
    3850        poll_for_dms     => 1,
    3951        publish_tweets   => 1,
    40         show_unsubscribed_replies => 1,
     52        show_mentions    => 1,
    4153        %$cfg
    4254       };
     
    118130    };
    119131
    120     if ($self->{cfg}->{show_unsubscribed_replies}) {
     132    if ($self->{cfg}->{show_mentions}) {
    121133        my $mentions = eval { $self->{twitter}->mentions( { since_id => $self->{last_id} } ) };
    122134        warn "$@" if $@;
Note: See TracChangeset for help on using the changeset viewer.