OSDN Git Service

TwitterApi.UserStreamsのパラメータチェックを変更
authorspx <spx268@gmail.com>
Sat, 2 Jul 2016 18:19:01 +0000 (03:19 +0900)
committerspx <spx268@gmail.com>
Sat, 2 Jul 2016 18:19:01 +0000 (03:19 +0900)
nullだけでなく空文字も無視する

OpenTween/Api/TwitterApi.cs

index f1a966f..088a2fd 100644 (file)
@@ -665,9 +665,9 @@ namespace OpenTween.Api
             var endpoint = new Uri("https://userstream.twitter.com/1.1/user.json");
             var param = new Dictionary<string, string>();
 
-            if (replies != null)
+            if (!string.IsNullOrEmpty(replies))
                 param["replies"] = replies;
-            if (track != null)
+            if (!string.IsNullOrEmpty(track))
                 param["track"] = track;
 
             return this.apiConnection.GetStreamAsync(endpoint, param);