Changeset 5214546
- Timestamp:
- Dec 19, 2009, 9:58:49 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 22fce654
- Parents:
- 9876953
- git-author:
- Nelson Elhage <nelhage@mit.edu> (12/19/09 18:57:20)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (12/19/09 21:58:49)
- Location:
- lib/BarnOwl/Module
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/BarnOwl/Module/Twitter.pm
r176434d r5214546 256 256 ); 257 257 258 BarnOwl::new_command( 'twitter-retweet' => sub { cmd_twitter_retweet(@_) }, 259 { 260 summary => 'Retweet the current Twitter message', 261 usage => 'twitter-retweet [ACCOUNT]', 262 description => <<END_DESCRIPTION 263 Retweet the current Twitter message using ACCOUNT (defaults to the 264 account that received the tweet). 265 END_DESCRIPTION 266 } 267 ); 268 258 269 BarnOwl::new_command( 'twitter-follow' => sub { cmd_twitter_follow(@_); }, 259 270 { … … 304 315 BarnOwl::start_edit_win("Reply to \@" . $user . ($account->nickname ? (" on " . $account->nickname) : ""), 305 316 sub { $account->twitter_atreply($user, $id, shift) }); 317 } 318 319 sub cmd_twitter_retweet { 320 my $cmd = shift; 321 my $account = shift; 322 my $m = BarnOwl::getcurmsg(); 323 if(!$m || $m->type ne 'Twitter') { 324 die("$cmd must be used with a Twitter message selected.\n"); 325 } 326 327 $account = $m->account unless defined($account); 328 find_account($account)->twitter_retweet($m); 306 329 } 307 330 -
lib/BarnOwl/Module/Twitter/Handle.pm
r9876953 r5214546 299 299 } 300 300 301 sub twitter_retweet { 302 my $self = shift; 303 my $msg = shift; 304 305 if($msg->service ne $self->{cfg}->{service}) { 306 die("Cannot retweet a message from a different service.\n"); 307 } 308 $self->twitter_command(retweet => $msg->{status_id}); 309 } 310 301 311 sub twitter_follow { 302 312 my $self = shift;
Note: See TracChangeset
for help on using the changeset viewer.