Skip to content

Commit

Permalink
Fixed issue with friendship_create. Twitter assumed if follow paramet…
Browse files Browse the repository at this point in the history
…er was there it should turn notifications on even for follow=false. friendship_create now only sends follow if follow is true.
  • Loading branch information
jnunemaker committed Apr 10, 2009
1 parent 61b8708 commit 5ebf39c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions History
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.5.3 - April 10, 2009
* 1 minor fix
* Twitter API assumed follow true whether true or false. Now only sending follow along to request if follow is true for calls to friendship_create.

0.5.2 - April 8, 2009
* 4 minor fixes
* added mash as an install dependency, forgot it initially
Expand Down
4 changes: 3 additions & 1 deletion lib/twitter/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def direct_message_destroy(id)
end

def friendship_create(id, follow=false)
perform_post("/friendships/create/#{id}.json", :body => {:follow => follow})
body = {}
body.merge!(:follow => follow) if follow
perform_post("/friendships/create/#{id}.json", :body => body)
end

def friendship_destroy(id)
Expand Down

0 comments on commit 5ebf39c

Please sign in to comment.