Hi all, 

Recently, probably due to a Skype upgrade the Gnome-Do Skype plugin does not 
import user names.
I managed to track down the problem to a GET GROUP <ID> USERS to which Skype 
replies on DBUS with "" instead of GROUP <ID> USERS ...
Skype.Get() method expects the response to start either with ERROR or to have 
GROUP <ID> USERS prefix.
Because "" is not "ERROR" the code tries to extract users substring from an 
invalid index which fails.

The problem is that new Skype version doesn't respect the API and replies 
unexpectedly with an empty string.
I found a workaround in  
http://forum.skype.com/index.php?showtopic=793313 namely to use "SEARCH 
FRIENDS" instead of "GROUP <ID> USERS"
I've tested it and it works. 

Here are the changes:
$ bzr diff=== modified file 'Skype/src/Skype.cs'
--- Skype/src/Skype.cs2009-10-02 02:12:09 +0000
+++ Skype/src/Skype.cs2011-06-17 12:29:17 +0000
@@ -211,11 +211,14 @@
 yield break;
 }
 
-string handlesReply = Skype.Get ("GROUP {0} USERS", onlineGroup);
+string handlesReply = SkypeObject.Invoke ("SEARCH FRIENDS");
 
 if (handlesReply.StartsWith ("ERROR")) {
 Log<Skype>.Error ("Could not fetch friend handles.");
 Log<Skype>.Debug ("Skype returned: {0}", handlesReply);
+    handlesReply = "";
+} else {
+    handlesReply = handlesReply.Substring ("USERS ".Length).Trim ();
 }
 
 IEnumerable<string> handles = handlesReply.Split (new [] {','});
@@ -310,4 +313,4 @@
 return input;
 }
 }
-}
\ No newline at end of file
+}

It's a hack and I'm not sure they follow the design of this module or if 
something else breaks.

Thanks,
Daniel
_______________________________________________
Mailing list: https://launchpad.net/~do-plugins
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~do-plugins
More help   : https://help.launchpad.net/ListHelp

Reply via email to