OSDN Git Service

PostStatusOptionsにAutoPopulateReplyMetadataプロパティを追加
authorKimura Youichi <kim.upsilon@bucyou.net>
Mon, 3 Oct 2016 12:45:19 +0000 (21:45 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 11 Nov 2017 21:07:22 +0000 (06:07 +0900)
OpenTween/PostStatusOptions.cs
OpenTween/Tween.cs
OpenTween/Twitter.cs

index 4f18805..a102b26 100644 (file)
@@ -33,6 +33,7 @@ namespace OpenTween
         public string Text { get; set; }
         public long? InReplyToStatusId { get; set; }
         public IReadOnlyList<long> MediaIds { get; set; }
+        public bool AutoPopulateReplyMetadata { get; set; }
         public IReadOnlyList<long> ExcludeReplyUserIds { get; set; }
         public string AttachmentUrl { get; set; }
     }
index 0011112..30e3d15 100644 (file)
@@ -2142,8 +2142,10 @@ namespace OpenTween
             };
 
             var replyToPost = this.inReplyTo != null ? this._statuses[this.inReplyTo.Item1] : null;
-            if (replyToPost != null)
+            if (replyToPost != null && !status.Text.Contains("RT @"))
             {
+                status.AutoPopulateReplyMetadata = true;
+
                 // ReplyToList のうち autoPopulatedUserIds に含まれていないユーザー ID を抽出
                 status.ExcludeReplyUserIds = replyToPost.ReplyToList.Select(x => x.Item1).Except(autoPopulatedUserIds)
                     .ToArray();
index 4153dd9..02a713f 100644 (file)
@@ -298,12 +298,8 @@ namespace OpenTween
                 return;
             }
 
-            var autoPopulateReplyMetadata = false;
-            if (param.InReplyToStatusId != null && !param.Text.Contains("RT @"))
-                autoPopulateReplyMetadata = true;
-
             var response = await this.Api.StatusesUpdate(param.Text, param.InReplyToStatusId, param.MediaIds,
-                    autoPopulateReplyMetadata, param.ExcludeReplyUserIds, param.AttachmentUrl)
+                    param.AutoPopulateReplyMetadata, param.ExcludeReplyUserIds, param.AttachmentUrl)
                 .ConfigureAwait(false);
 
             var status = await response.LoadJsonAsync()