Permalink
Browse files

fix to cofirm before :favorite and :unfavorite

  • Loading branch information...
1 parent 7f3a6db commit 769ced168d19827b2acebc814eca0d5f360f1902 @jugyo jugyo committed Mar 30, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/earthquake/commands.rb
View
@@ -116,11 +116,17 @@ module Earthquake
end
command :favorite do |m|
- async { twitter.favorite(m[1]) }
+ tweet = twitter.status(m[1])
+ if confirm("favorite '#{tweet["user"]["screen_name"]}: #{tweet["text"].e}'")
+ async { twitter.favorite(m[1]) }
+ end
end
command :unfavorite do |m|
- async { twitter.unfavorite(m[1]) }
+ tweet = twitter.status(m[1])
+ if confirm("unfavorite '#{tweet["user"]["screen_name"]}: #{tweet["text"].e}'")
+ async { twitter.unfavorite(m[1]) }
+ end
end
command :retweeted_by_me do

0 comments on commit 769ced1

Please sign in to comment.