OSDN Git Service

attachment_urlとmedia_idを同時に指定できない仕様を考慮
authorKimura Youichi <kim.upsilon@bucyou.net>
Mon, 3 Oct 2016 16:29:18 +0000 (01:29 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 11 Nov 2017 21:07:31 +0000 (06:07 +0900)
https://twittercommunity.com/t/74725

OpenTween/Tween.cs

index 730a737..9db539f 100644 (file)
@@ -4784,12 +4784,15 @@ namespace OpenTween
         /// </summary>
         private string RemoveAttachmentUrl(string statusText, out string attachmentUrl)
         {
+            attachmentUrl = null;
+
+            // attachment_url は media_id と同時に使用できない
+            if (this.ImageSelector.Visible && this.ImageSelector.SelectedService is TwitterPhoto)
+                return statusText;
+
             var match = Twitter.AttachmentUrlRegex.Match(statusText);
             if (!match.Success)
-            {
-                attachmentUrl = null;
                 return statusText;
-            }
 
             attachmentUrl = match.Value;