OSDN Git Service

graphqlエンドポイント使用時にツイート検索の言語指定が効かない不具合を修正
[opentween/open-tween.git] / OpenTween / Twitter.cs
index 4e1030f..f3d0cac 100644 (file)
@@ -1113,7 +1113,12 @@ namespace OpenTween
             TwitterStatus[] statuses;
             if (this.Api.AuthType == APIAuthType.TwitterComCookie)
             {
-                var request = new SearchTimelineRequest(tab.SearchWords)
+                var query = tab.SearchWords;
+
+                if (!MyCommon.IsNullOrEmpty(tab.SearchLang))
+                    query = $"({query}) lang:{tab.SearchLang}";
+
+                var request = new SearchTimelineRequest(query)
                 {
                     Count = count,
                     Cursor = more ? tab.CursorBottom : tab.CursorTop,