Version: 1.0 (using KDE 4.6.5) OS: Linux Twitter automatically shortens all URLs longer than 18 characters with their t.co domain. URLs therefore count a maximum of 19 characters to the length of the Tweet. choqok should take this into consideration when calculating the length of the tweet when composing. Reproducible: Always Steps to Reproduce: Compose the following tweet: "This is an example of a long tweet which is counted as too long because of Twitter's automatic shortening. https://dev.twitter.com/docs/tco-link-wrapper" Actual Results: Remaining characters is displayed as -12. Expected Results: Remaining characters should be 14. https://dev.twitter.com/docs/tco-link-wrapper/faq#How_do_I_calculate_if_a_Tweet_with_a_link_is_going_to_be_over_140_characters_or_not
This also happens when attaching a media. Write a tweet 140 chars long and attach a media. Choqok reports "0" chars remaining, but Twitter says -23 because the attached media becomes a link that is appended to the tweet.
Git commit 9286fdb31cb31985420c934b04305fb03fbe4251 by Andrea Scarpino. Committed on 20/12/2014 at 08:51. Pushed by scarpino into branch 'master'. Take Twitter's t.co urls lenght in consideration See https://dev.twitter.com/overview/t.co for more info. REVIEW: 121610 FIXED-IN: 1.5 M +1 -1 helperlibs/twitterapihelper/twitterapicomposerwidget.cpp M +104 -5 helperlibs/twitterapihelper/twitterapitextedit.cpp M +10 -3 helperlibs/twitterapihelper/twitterapitextedit.h M +1 -0 libchoqok/CMakeLists.txt M +15 -0 libchoqok/ui/choqoktextedit.cpp M +4 -1 libchoqok/ui/choqoktextedit.h M +14 -54 libchoqok/ui/postwidget.cpp M +1 -2 libchoqok/ui/postwidget.h A +101 -0 libchoqok/urlutils.cpp [License: GPL] A +47 -0 libchoqok/urlutils.h [License: GPL] M +1 -1 microblogs/laconica/laconicacomposerwidget.cpp http://commits.kde.org/choqok/9286fdb31cb31985420c934b04305fb03fbe4251
*** Bug 294969 has been marked as a duplicate of this bug. ***