changeset 31389:380314aa5c1b

Fix some issues with purple-url-handler. The findaccount function was failing because the call to cpurple.PurpleAccountGetProtocolId used the wrong case for the function name. The IRC handler could also incorrectly called unquote_plus with a None value. I didn't really check the rest of the IRC handler, though. It might be broken in other ways. Reported by PotterT|VF in the IRC channel.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 16 Mar 2011 04:59:16 +0000
parents 0efc07144f2f
children 7a5c2db0803d
files ChangeLog libpurple/purple-url-handler
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Mar 16 01:46:12 2011 +0000
+++ b/ChangeLog	Wed Mar 16 04:59:16 2011 +0000
@@ -14,6 +14,7 @@
 	  #13095)
 	* Simple Silence Suppression is optional per-account. (Jakub Adam) (half
 	  of #13180)
+	* Fix purple-url-handler being unable to find an account.
 
 	Pidgin:
 	* Duplicate code cleanup.  (Gabriel Schulhof) (#10599)
--- a/libpurple/purple-url-handler	Wed Mar 16 01:46:12 2011 +0000
+++ b/libpurple/purple-url-handler	Wed Mar 16 04:59:16 2011 +0000
@@ -73,7 +73,7 @@
 def findaccount(protocolname, accountname="", matcher=None):
     if matcher:
         for account in cpurple.PurpleAccountsGetAll():
-            if (protocolname != cpurple.PurpleAccountGetProtocolID(account)) or \
+            if (protocolname != cpurple.PurpleAccountGetProtocolId(account)) or \
                (accountname != "" and accountname != cpurple.PurpleAccountGetUsername(account)):
                 continue
             if matcher(account):
@@ -188,7 +188,7 @@
         print "Invalid irc URI: %s" % uri
         return
 
-    server = urllib.unquote_plus(match.group(2)) or ""
+    server = urllib.unquote_plus(match.group(2) or "")
     target = match.group(3) or ""
     query = match.group(5) or ""