-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support writing quote tweets with attached images #631
base: master
Are you sure you want to change the base?
Conversation
Umm, it seems like the bug is more that there is a possibility of adding images to quote tweets? This will obviously break as soon as the quoted tweet contains images itself (and is not possible on twitter.com). |
It depends what functionality you want. Twitter doesn't allow adding images to quotes, but since swapping back to "old" behaviour is so simple then it seemed like the best of both worlds. I'll check what Corebird does with quote containing an image. IMO, we shouldn't show the quoted image but should keep the link in that situation (assuming it even recognises the "quoted" tweet as a quote and doesn't just have it presented as a link that just happens to be to a Twitter tweet) |
Actually, I think the patch still matches Twitter Web behaviour (tested on my ibbtwtr test account) |
Under "long tweet" rules, quotes are attachments, so quote plus images means too many attachments. The easiest way to fix this is to add the quoted URL inline (old style quote) if we also have images to upload.
If we don't do this then adding and removing an image leaves the user with a 23 character shorter message limit!
This is allowed on the web UI, even though the URL will now be in the additional metadata rather than the message text
39c2e10
to
745da77
Compare
Hmm, hasn't this been solved recently? I seem to remember that this got fixed. (just asking because this PR is still open) |
Commit 85cd7e1 "fixes" it by preventing the image buttons being used when quoting (which is what Twitter does). My patch (which seemed to apply cleanly locally, and just needed one extra line to deal with the "fav image" button) fixes it by making images override quoting. That means that if you quote then it puts the tweet URL in the attachment field, but if you quote and then add an image then it puts the images as the attachment, adds the quoted tweet's URL in the tweet body and calculates the message length appropriately. Personally, I prefer my method, as there's no practical reason not to do it, the user gets sufficient feedback, and Twitter still does something sensible with it (it shows the images you attached and leaves the tweet in the text - see examples). It also makes referencing tweets easier and more flexible. Current method for referencing a tweet in a message including images:
My method:
[Edit] Oh, and if you mean #681, that was about displaying quotes, not posting them. |
The previous quote tweet character counting fix worked for pure text, but failed if you added an image as well.
Twitter (un)helpfully treats both an image and a quote as an attachment. This change drops back to old quoting behaviour (inline URL) if an image is added, including changing the character count while composing the tweet, but keeps the new attachment behaviour for "just quote with text" and "images without a quoted tweet".