Twitter's API doesn't automatically shorten URLs in all cases.
tircd should have an option to auto shrink URLs before they are sent to the twitter API.
Comment #1
Posted on Jan 30, 2009 by Quick GiraffeI was bored, so I implemented something for this. I've only recently picked up Perl though, so it might not be the best way of doing things. (I didn't add any config options, so it just does it by default.)
Also, this is my first FOSS contribution, so I don't know if the diff that I supplied is the right thing to be giving.
- tircd_diff 1.28KB
Comment #2
Posted on Apr 10, 2009 by Grumpy Bear(No comment was entered for this change.)
Comment #3
Posted on Aug 8, 2009 by Swift RhinoWe should test the length of the msg and not bother to shorten links if the msg length is 140 chr or less.
Changing line 727 to:
if (length($msg) > 140 && eval("require URI::Find;") &&
$heap->{'config'}->{'shorten_urls'}) {
seems sufficient.
Comment #4
Posted on Mar 1, 2010 by Happy PandaThis code appears in the current codebase.
Status: Fixed
Labels:
Type-Enhancement
Priority-Low