開発に使用するリポジトリ
Révision | eefa7bbc515d5c3b9f67c73cec4de4e3964f4a48 (tree) |
---|---|
l'heure | 2023-07-20 02:07:43 |
Auteur | Kimura Youichi <kim.upsilon@bucy...> |
Commiter | Kimura Youichi |
Merge branch 'develop' into release
@@ -1,5 +1,9 @@ | ||
1 | 1 | 更新履歴 |
2 | 2 | |
3 | +==== Ver 3.7.1(2023/07/20) | |
4 | + * FIX: Cookie使用時に複数回ツイートを投稿するとDelaying?のエラーが表示される不具合を修正 | |
5 | + * FIX: 自己リプライのスレッドに含まれるツイートを発言一覧で選択するとエラーが発生する不具合を修正 | |
6 | + | |
3 | 7 | ==== Ver 3.7.0(2023/07/19) |
4 | 8 | * NEW: Cookie使用時のツイート投稿・削除に対応 |
5 | 9 | * NEW: Cookie使用時のリツイートおよびリツイートの取消に対応 |
@@ -123,5 +123,18 @@ namespace OpenTween.Api.GraphQL | ||
123 | 123 | Assert.Equal("1602775353088524288", post.StatusId.Id); |
124 | 124 | Assert.Equal(357750891L, post.UserId); |
125 | 125 | } |
126 | + | |
127 | + [Fact] | |
128 | + public void ToStatus_WithTwitterPostFactory_SelfThread_Test() | |
129 | + { | |
130 | + var rootElm = this.LoadResponseDocument("TimelineTweet_SelfThread.json"); | |
131 | + var timelineTweet = new TimelineTweet(rootElm); | |
132 | + var status = timelineTweet.ToTwitterStatus(); | |
133 | + var postFactory = new TwitterPostFactory(this.CreateTabInfo()); | |
134 | + var post = postFactory.CreateFromStatus(status, selfUserId: 1L, new HashSet<long>()); | |
135 | + | |
136 | + Assert.Equal("1511751702684499968", post.StatusId.Id); | |
137 | + Assert.Equal(40480664L, post.UserId); | |
138 | + } | |
126 | 139 | } |
127 | 140 | } |
@@ -82,5 +82,8 @@ | ||
82 | 82 | <None Update="Resources\Responses\TweetDetail.json"> |
83 | 83 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
84 | 84 | </None> |
85 | + <None Update="Resources\Responses\TimelineTweet_SelfThread.json"> | |
86 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
87 | + </None> | |
85 | 88 | </ItemGroup> |
86 | 89 | </Project> |
@@ -0,0 +1,124 @@ | ||
1 | +{ | |
2 | + "itemType": "TimelineTweet", | |
3 | + "__typename": "TimelineTweet", | |
4 | + "tweet_results": { | |
5 | + "result": { | |
6 | + "__typename": "Tweet", | |
7 | + "rest_id": "1511751702684499968", | |
8 | + "has_birdwatch_notes": false, | |
9 | + "core": { | |
10 | + "user_results": { | |
11 | + "result": { | |
12 | + "__typename": "User", | |
13 | + "id": "VXNlcjo0MDQ4MDY2NA==", | |
14 | + "rest_id": "40480664", | |
15 | + "affiliates_highlighted_label": {}, | |
16 | + "has_graduated_access": true, | |
17 | + "is_blue_verified": false, | |
18 | + "profile_image_shape": "Circle", | |
19 | + "legacy": { | |
20 | + "followed_by": true, | |
21 | + "following": true, | |
22 | + "can_dm": true, | |
23 | + "can_media_tag": true, | |
24 | + "created_at": "Sat May 16 15:20:01 +0000 2009", | |
25 | + "default_profile": false, | |
26 | + "default_profile_image": false, | |
27 | + "description": "OpenTween Project 言い出しっぺ", | |
28 | + "entities": { | |
29 | + "description": { | |
30 | + "urls": [] | |
31 | + }, | |
32 | + "url": { | |
33 | + "urls": [ | |
34 | + { | |
35 | + "display_url": "m.upsilo.net/@upsilon", | |
36 | + "expanded_url": "https://m.upsilo.net/@upsilon", | |
37 | + "url": "https://t.co/vNMmyHHOQD", | |
38 | + "indices": [ | |
39 | + 0, | |
40 | + 23 | |
41 | + ] | |
42 | + } | |
43 | + ] | |
44 | + } | |
45 | + }, | |
46 | + "fast_followers_count": 0, | |
47 | + "favourites_count": 216205, | |
48 | + "followers_count": 1304, | |
49 | + "friends_count": 917, | |
50 | + "has_custom_timelines": false, | |
51 | + "is_translator": false, | |
52 | + "listed_count": 92, | |
53 | + "location": "Funabashi, Chiba, Japan", | |
54 | + "media_count": 1040, | |
55 | + "name": "upsilon", | |
56 | + "normal_followers_count": 1304, | |
57 | + "pinned_tweet_ids_str": [], | |
58 | + "possibly_sensitive": false, | |
59 | + "profile_banner_url": "https://pbs.twimg.com/profile_banners/40480664/1349188016", | |
60 | + "profile_image_url_https": "https://pbs.twimg.com/profile_images/719076434/____normal.png", | |
61 | + "profile_interstitial_type": "", | |
62 | + "screen_name": "kim_upsilon", | |
63 | + "statuses_count": 10096, | |
64 | + "translator_type": "regular", | |
65 | + "url": "https://t.co/vNMmyHHOQD", | |
66 | + "verified": false, | |
67 | + "want_retweets": true, | |
68 | + "withheld_in_countries": [] | |
69 | + } | |
70 | + } | |
71 | + } | |
72 | + }, | |
73 | + "edit_control": { | |
74 | + "edit_tweet_ids": [ | |
75 | + "1511751702684499968" | |
76 | + ], | |
77 | + "editable_until_msecs": "1649266467565", | |
78 | + "is_edit_eligible": true, | |
79 | + "edits_remaining": "5" | |
80 | + }, | |
81 | + "edit_perspective": { | |
82 | + "favorited": false, | |
83 | + "retweeted": false | |
84 | + }, | |
85 | + "is_translatable": true, | |
86 | + "views": { | |
87 | + "state": "Enabled" | |
88 | + }, | |
89 | + "source": "<a href=\"https://www.opentween.org/\" rel=\"nofollow\">OpenTween (dev)</a>", | |
90 | + "legacy": { | |
91 | + "bookmark_count": 0, | |
92 | + "bookmarked": false, | |
93 | + "created_at": "Wed Apr 06 17:04:27 +0000 2022", | |
94 | + "conversation_id_str": "1511751702684499968", | |
95 | + "display_text_range": [ | |
96 | + 0, | |
97 | + 45 | |
98 | + ], | |
99 | + "entities": { | |
100 | + "user_mentions": [], | |
101 | + "urls": [], | |
102 | + "hashtags": [], | |
103 | + "symbols": [] | |
104 | + }, | |
105 | + "favorite_count": 1, | |
106 | + "favorited": false, | |
107 | + "full_text": "OpenTweenそろそろ次のリリースしたいんだけど今のAPI規制下で出してもねえ、という", | |
108 | + "is_quote_status": false, | |
109 | + "lang": "ja", | |
110 | + "quote_count": 0, | |
111 | + "reply_count": 1, | |
112 | + "retweet_count": 0, | |
113 | + "retweeted": false, | |
114 | + "user_id_str": "40480664", | |
115 | + "id_str": "1511751702684499968" | |
116 | + }, | |
117 | + "quick_promote_eligibility": { | |
118 | + "eligibility": "IneligibleNotProfessional" | |
119 | + } | |
120 | + } | |
121 | + }, | |
122 | + "tweetDisplayType": "SelfThread", | |
123 | + "hasModeratedReplies": false | |
124 | +} |
@@ -156,7 +156,7 @@ namespace OpenTween.Api.GraphQL | ||
156 | 156 | |
157 | 157 | public static TimelineTweet[] ExtractTimelineTweets(XElement element) |
158 | 158 | { |
159 | - return element.XPathSelectElements($"//itemContent[itemType[text()='{TypeName}']][tweetDisplayType[text()='Tweet']]") | |
159 | + return element.XPathSelectElements($"//itemContent[itemType[text()='{TypeName}']][tweetDisplayType[text()='Tweet' or text()='SelfThread']]") | |
160 | 160 | .Select(x => new TimelineTweet(x)) |
161 | 161 | .ToArray(); |
162 | 162 | } |
@@ -22,7 +22,7 @@ using System.Runtime.InteropServices; | ||
22 | 22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です |
23 | 23 | [assembly: Guid("2d0ae0ba-adac-49a2-9b10-26fd69e695bf")] |
24 | 24 | |
25 | -[assembly: AssemblyVersion("3.7.0.0")] | |
25 | +[assembly: AssemblyVersion("3.7.1.0")] | |
26 | 26 | |
27 | 27 | [assembly: InternalsVisibleTo("OpenTween.Tests")] |
28 | 28 | [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // for Moq |
@@ -580,6 +580,10 @@ namespace OpenTween.Properties { | ||
580 | 580 | /// <summary> |
581 | 581 | /// 更新履歴 |
582 | 582 | /// |
583 | + ///==== Ver 3.7.1(2023/07/20) | |
584 | + /// * FIX: Cookie使用時に複数回ツイートを投稿するとDelaying?のエラーが表示される不具合を修正 | |
585 | + /// * FIX: 自己リプライのスレッドに含まれるツイートを発言一覧で選択するとエラーが発生する不具合を修正 | |
586 | + /// | |
583 | 587 | ///==== Ver 3.7.0(2023/07/19) |
584 | 588 | /// * NEW: Cookie使用時のツイート投稿・削除に対応 |
585 | 589 | /// * NEW: Cookie使用時のリツイートおよびリツイートの取消に対応 |
@@ -589,12 +593,7 @@ namespace OpenTween.Properties { | ||
589 | 593 | /// * CHG: Google画像検索のURLの変更に対応 |
590 | 594 | /// * FIX: 発言一覧でDMを選択中に発言詳細部の日時ラベルをクリックするとエラーが発生する不具合を修正 |
591 | 595 | /// * FIX: Cookie使用時に「Listの発言取得に公式RTを含める」の設定が適用されない不具合を修正 |
592 | - /// | |
593 | - ///==== Ver 3.6.2(2023/07/07) | |
594 | - /// * FIX: リプライ制限されたツイートのRTがリストのタイムラインに含まれているとエラーになる不具合を修正 | |
595 | - /// | |
596 | - ///==== Ver 3.6.1(2023/07/07) | |
597 | - /// * CHG: graphqlエンドポイントからのレス [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 | |
596 | + /// [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 | |
598 | 597 | /// </summary> |
599 | 598 | internal static string ChangeLog { |
600 | 599 | get { |
@@ -174,7 +174,7 @@ namespace OpenTween | ||
174 | 174 | |
175 | 175 | private readonly TwitterPostFactory postFactory; |
176 | 176 | |
177 | - private long previousStatusId = -1L; | |
177 | + private string? previousStatusId = null; | |
178 | 178 | |
179 | 179 | public Twitter(TwitterApi api) |
180 | 180 | { |
@@ -286,10 +286,10 @@ namespace OpenTween | ||
286 | 286 | |
287 | 287 | this.UpdateUserStats(status.User); |
288 | 288 | |
289 | - if (status.Id == this.previousStatusId) | |
289 | + if (status.IdStr == this.previousStatusId) | |
290 | 290 | throw new WebApiException("OK:Delaying?"); |
291 | 291 | |
292 | - this.previousStatusId = status.Id; | |
292 | + this.previousStatusId = status.IdStr; | |
293 | 293 | |
294 | 294 | // 投稿したものを返す |
295 | 295 | var post = this.CreatePostsFromStatusData(status); |
@@ -689,7 +689,9 @@ namespace OpenTween | ||
689 | 689 | FocalTweetId = id, |
690 | 690 | }; |
691 | 691 | var tweets = await request.Send(this.Api.Connection).ConfigureAwait(false); |
692 | - status = tweets.Select(x => x.ToTwitterStatus()).Where(x => x.IdStr == id.Id).First(); | |
692 | + status = tweets.Select(x => x.ToTwitterStatus()) | |
693 | + .Where(x => x.IdStr == id.Id) | |
694 | + .FirstOrDefault() ?? throw new WebApiException("Empty result set"); | |
693 | 695 | } |
694 | 696 | else |
695 | 697 | { |
@@ -1,4 +1,4 @@ | ||
1 | -version: 3.6.2.{build} | |
1 | +version: 3.7.0.{build} | |
2 | 2 | |
3 | 3 | os: Visual Studio 2022 |
4 | 4 |