#855 closed defect (fixed)
[Twitter] count URLs as $short_url_length
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Version: | 3.0.3 | |
Keywords: | Cc: | ||
IRC client+version: | Client-independent | Operating System: | Public server |
OS version/distro: |
Description
Twitter is forcing their t.co URL Wrapper in everything now. Currently, Tweet length is counted as the amount of characters. Since Twitter will change URLs to t.co URLs, URLs shouldn't be counted in their original form, but by the value of "short_url_length" in help/configuration, which is currently 19.
Example:
Posting this from Twitter: "This ChangeLog mostly lists changes relevant to users. A full log can be found in the bzr commit logs: http://bugs.bitlbee.org/bitlbee/browser/devel/doc/CHANGES" results in the error: "twitter - Error: Maximum message length exceeded: 160 > 140"
Since the URL will be shortened, the actual character count is 123.
Attachments (3)
Change History (11)
comment:1 Changed at 2011-11-14T11:17:06Z by
Component: | BitlBee → Twitter |
---|
comment:2 Changed at 2012-01-04T15:37:12Z by
comment:3 Changed at 2012-01-26T08:50:49Z by
+1. This bug is quite annoying, preventing you from fully using the already quite limited 140 characters :(
Changed at 2012-01-26T16:50:19Z by
Attachment: | bitlbee-bzr872-twitter_tco_url_length.patch added |
---|
comment:4 Changed at 2012-01-26T16:58:34Z by
Turns out glib supports regexps, yay. Heres a patch for this issue. The only thing that concerns me here is that the regexp is recompiled for every message, but I couldn't find a good place to store it and it doesn't seem to affect performance much.
Changed at 2012-01-27T07:30:51Z by
Attachment: | bitlbee-bzr872-twitter_tco_url_length_set.patch added |
---|
comment:5 Changed at 2012-01-27T07:32:50Z by
Updated version. Replaced TCO_LEN define with target_url_length set variable (defaults to 20), setting it to 0 or negative disables the feature. If target url is https:// 1 is added to target_url_length.
Changed at 2012-01-31T14:11:04Z by
Attachment: | bitlbee-bzr877-twitter_tco_url_length.patch added |
---|
comment:6 Changed at 2012-01-31T14:12:19Z by
Same as previous, but the setting is disabled for identica accs by default. +documentation
comment:7 Changed at 2012-02-08T00:28:23Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks once again, Artem!
+1 for this feature. Would be very useful.