From 5ebf39c0538a3dfd48c6a1dbdf8558305737ce69 Mon Sep 17 00:00:00 2001 From: John Nunemaker Date: Fri, 10 Apr 2009 13:24:06 -0400 Subject: [PATCH] Fixed issue with friendship_create. Twitter assumed if follow parameter was there it should turn notifications on even for follow=false. friendship_create now only sends follow if follow is true. --- History | 4 ++++ lib/twitter/base.rb | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/History b/History index fdfc1724d..f018bcce8 100644 --- a/History +++ b/History @@ -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 diff --git a/lib/twitter/base.rb b/lib/twitter/base.rb index 5e67e63ad..9c3a69c9e 100644 --- a/lib/twitter/base.rb +++ b/lib/twitter/base.rb @@ -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)