Package: twidge
Version: 1.0.2
Severity: normal
Tags: patch upstream

The manpage states that Twidge will attempt to shorten URLs in your
updates via the is.gd, bit.ly, j.ump or TinyURL services, if one
sets the shortenurl option to 'yes' in ~/.twidgerc.

However, if the update's text length is less than or equal to 140
characters, the URL shortening does not happen, because of the
way the function procStatus (taken from Commands/Update.hs) has
been written:

procStatus cp section status =
    do poststatus <- case get cp section "shortenurls" of
                       Right True | length status > 140
                                  -> shortenUrls cp status
                       _ -> return status
       when (length poststatus > 140)
                (permFail $ "Your status update was " ++ 
                          show (length poststatus) ++
                          " characters; max length 140")
       return poststatus

The shortenUrls config option only applies to statuses longer
than 140 characters. Dropping the guard on the first branch of the case
ought to fix the problem, shortening all URLs all the time.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-core2 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages twidge depends on:
ii  curl                      7.21.1-1       Get a file from an HTTP, HTTPS or 
ii  libc6                     2.11.2-2       Embedded GNU C Library: Shared lib
ii  libcurl3-gnutls           7.21.1-1       Multi-protocol file transfer libra
ii  libffi5                   3.0.9-2        Foreign Function Interface library
ii  libgmp3c2                 2:4.3.2+dfsg-1 Multiprecision arithmetic library

twidge recommends no packages.

twidge suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to