mikedamage-tweeb 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/tweeb_client.rb +4 -4
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
data/lib/tweeb_client.rb
CHANGED
@@ -224,9 +224,9 @@ module Tweeb
|
|
224
224
|
end
|
225
225
|
alias_method :unfollow, :unfriend
|
226
226
|
|
227
|
-
def friendship_info(target, source=
|
227
|
+
def friendship_info(target, source="")
|
228
228
|
query = Hash.new
|
229
|
-
|
229
|
+
unless source.empty?
|
230
230
|
if source.is_a?(Fixnum)
|
231
231
|
query[:source_id] = source
|
232
232
|
elsif source.is_a?(String)
|
@@ -244,8 +244,8 @@ module Tweeb
|
|
244
244
|
@masher.call(json)
|
245
245
|
end
|
246
246
|
|
247
|
-
def friendship_exists?(target, source=
|
248
|
-
rel = source.
|
247
|
+
def friendship_exists?(target, source="")
|
248
|
+
rel = source.empty? ? friendship_info(target) : friendship_info(target, source)
|
249
249
|
return true if rel.relationship.source.following && rel.relationship.target.following
|
250
250
|
false
|
251
251
|
end
|