Changeset a0385ad3 for lib/BarnOwl/Module
- Timestamp:
- May 21, 2009, 4:51:34 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 8496cc2
- Parents:
- d658c29
- git-author:
- Kevin Riggle <kevinr@free-dissociation.com> (05/19/09 22:54:48)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (05/21/09 16:51:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/BarnOwl/Module/Twitter.pm
rd658c29 ra0385ad3 94 94 } 95 95 96 $twitter = Net::Twitter->new(username => $cfg->{user} || $user, 97 password => $cfg->{password}, 98 source => 'barnowl'); 96 my $twitter_args = { username => $cfg->{user} || $user, 97 password => $cfg->{password}, 98 source => 'barnowl', 99 }; 100 if (defined $cfg->{service}) { 101 my $service = $cfg->{service}; 102 $twitter_args->{apiurl} = $service; 103 my $apihost = $service; 104 $apihost =~ s/^\s*http:\/\///; 105 $apihost =~ s/\/.*$//; 106 $apihost .= ':80' unless $apihost =~ /:\d+$/; 107 $twitter_args->{apihost} = $cfg->{apihost} || $apihost; 108 my $apirealm = "Laconica API"; 109 $twitter_args->{apirealm} = $cfg->{apirealm} || $apirealm; 110 } 111 112 $twitter = Net::Twitter->new(%$twitter_args); 99 113 100 114 if(!defined($twitter->verify_credentials())) { … … 189 203 location => decode_entities($tweet->{user}{location}||""), 190 204 body => decode_entities($tweet->{text}), 191 status_id => $tweet->{id} 205 status_id => $tweet->{id}, 206 service => $cfg->{service}, 192 207 ); 193 208 BarnOwl::queue_message($msg); … … 221 236 location => decode_entities($tweet->{sender}{location}||""), 222 237 body => decode_entities($tweet->{text}), 223 isprivate => 'true' 238 isprivate => 'true', 239 service => $cfg->{service}, 224 240 ); 225 241 BarnOwl::queue_message($msg); … … 264 280 direction => 'out', 265 281 body => $msg, 266 isprivate => 'true' 282 isprivate => 'true', 283 service => $cfg->{service}, 267 284 ); 268 285 BarnOwl::queue_message($tweet);
Note: See TracChangeset
for help on using the changeset viewer.