Hey guys, I just discovered a bug with PyAIM-t. I don't know if this is happening with all clients but when an Adium contact sends me a URL with CAPITAL letters, (drag and drop url from Safari) the link I get in iChat doesn't have them capitalized and some web servers do of course use capitals.
It should be noted that if the URL is copied and then pasted, the capital letters ARE preserved and that iChat drag n' drop to Adium is OK. This a Adium bug? iChat bug? Or PyAIM-t bug? -- Travis Bell -------------- next part -------------- An HTML attachment was scrubbed... URL: http://modevia.com/pipermail/py-transports/attachments/20060406/0c248f38/attachment.html From [EMAIL PROTECTED] Mon Apr 10 11:23:37 2006 From: [EMAIL PROTECTED] (Rajnish Bhaskar) Date: Mon Apr 10 11:23:50 2006 Subject: [py-transports] Groupchat timeouts with PyMSNt Message-ID: <[EMAIL PROTECTED]> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Is there a setting in config.xml for defining how long a reqest to enter a groupchat will remain active for. I've had some of my users complain that it times out too quickly. Cheers, Raj. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) iD8DBQFEOkA54QHnsKZu8OQRAnw1AKCWOq/FLXRE8tSnhGnKvjCtzOLzCgCfWQaz 5E8U4/XTxL9RtMHdfH9b4WI= =G8iz -----END PGP SIGNATURE----- From [EMAIL PROTECTED] Mon Apr 10 17:00:21 2006 From: [EMAIL PROTECTED] (Lars T. Mikkelsen) Date: Mon Apr 10 17:00:26 2006 Subject: [py-transports] PyMSNt: Fix avatars in Google Talk Message-ID: <[EMAIL PROTECTED]> As you might know, Google Talk recently got support for vCard-Based Avatars. Unfortunately, the avatars won't work with PyMSNt. I've attached two patches to fix the issue. gtalk-avatars-receiving.patch (receiving avatars from MSN users): While PyMSNt breaks the base64 encoded avatar data into lines of 76 characters as recommended by JEP-0153, Section 4.6, Google Talk doesn't ignore the whitespace characters as required by the JEP - and thus the avatars in Google Talk will be all black. This is clearly a bug in Google Talk and I've reported it to Google. This patch is a simple workaround that encodes the avatar data without line breaks. gtalk-avatars-sending.patch (sending avatars to MSN users): Google Talk uses XML namespaces for vCard updates, that is: <presence>...<upd:x xmlns:upd='vcard-temp:x:update'>...</presence> To make PyMSNt correctly detect the namespace, it seems that the Element.uri attribute has to be used (and not Element.defaultUri) - I don't know the exact difference between uri and defaultUri, but perhaps defaultUri should just be replaced with uri throughout the entire source code. Furthermore, the Google Talk server won't allow retrieval of the vCard, unless the requesting entity has a resource (otherwise a resource-constraint error is returned). This patch fixes both issues. Finally, the Google Talk server seems to do some kind of rate limiting on vCard requests. Currently, PyMSNt will make a lot of requests for the same vCard. I don't have an exact solution for this, however, I'm thinking that it's sufficient to only process presence stanzas to the transport itself in jabw.JabberConnection.onPresence() - that is add a "if to.find('@') < 0" somewhere in this function. I think it's a general (and important) issue if PyMSNt makes more vCard requests than necessary, as this requires a lot of bandwith. Best regards, Lars -------------- next part -------------- Index: src/avatar.py =================================================================== --- src/avatar.py (revision 133) +++ src/avatar.py (working copy) @@ -51,14 +51,14 @@ cType = photo.addElement("TYPE") cType.addContent("image/png") binval = photo.addElement("BINVAL") - binval.addContent(base64.encodestring(self.getImageData())) + binval.addContent(base64.b64encode(self.getImageData())) return photo def makeDataElement(self): """ Returns an XML Element that can be put into a jabber:x:avatar IQ stanza. """ data = Element((None, "data")) data["mimetype"] = "image/png" - data.addContent(base64.encodestring(self.getImageData())) + data.addContent(base64.b64encode(self.getImageData())) return data def __eq__(self, other): -------------- next part -------------- Index: src/jabw.py =================================================================== --- src/jabw.py (revision 133) +++ src/jabw.py (working copy) @@ -267,7 +267,7 @@ show = child.__str__() elif(child.name == "priority"): priority = child.__str__() - elif(child.defaultUri == disco.XVCARDUPDATE): + elif(child.uri == disco.XVCARDUPDATE): avatarHash = " " for child2 in child.elements(): if(child2.name == "photo"): Index: src/session.py =================================================================== --- src/session.py (revision 133) +++ src/session.py (working copy) @@ -143,7 +143,7 @@ self.legacycon.updateAvatar() LogEvent(INFO, self.jabberID, "Fetching avatar.") - d = self.sendVCardRequest(to=self.jabberID, fro=config.jid) + d = self.sendVCardRequest(to=self.jabberID, fro=config.jid + "/msn") d.addCallback(vCardReceived) d.addErrback(errback) From [EMAIL PROTECTED] Sat Apr 15 13:47:07 2006 From: [EMAIL PROTECTED] (Norman Rasmussen) Date: Sat Apr 15 13:47:12 2006 Subject: [py-transports] Tracebacks Message-ID: <[EMAIL PROTECTED]> revision 133: these I see lots: File "/home/norman/src/svn/PyMSNt.trunk/src/legacy/glue.py", line 256, in removeMe self.logOut() File "/home/norman/src/svn/PyMSNt.trunk/src/tlib/msn/msnw.py", line 238, in logOut self.timeout.cancel() File "/usr/lib/python2.3/site-packages/twisted/internet/base.py", line 74, in cancel raise error.AlreadyCalled twisted.internet.error.AlreadyCalled: Tried to cancel an already-called event. and: File "/usr/lib/python2.3/site-packages/twisted/xish/utility.py", line 37, in callback methodwrapper(*args, **kwargs) File "/usr/lib/python2.3/site-packages/twisted/xish/utility.py", line 21, in __call__ self.method(*nargs, **nkwargs) File "src/main.py", line 261, in onMessage jabw.sendErrorMessage(self, fro, to, "auth", "not-authorized", lang.get(ulang).notLoggedIn, body) File "/home/norman/src/svn/PyMSNt.trunk/src/jabw.py", line 85, in sendErrorMessage desc.attributes["xmlns"] = XMPP_STANZAS exceptions.NameError: global name 'XMPP_STANZAS' is not defined this I've only seen once so far: File "src/main.py", line 252, in onMessage s.onMessage(el) File "/home/norman/src/svn/PyMSNt.trunk/src/jabw.py", line 242, in onMessage self.messageReceived(froj.userhost(), froj.resource, toj.userhost(), toj.resource, mtype, body, noerror) File "/home/norman/src/svn/PyMSNt.trunk/src/session.py", line 200, in messageReceived self.removeMe() File "/home/norman/src/svn/PyMSNt.trunk/src/session.py", line 89, in removeMe self.legacycon.removeMe() File "/home/norman/src/svn/PyMSNt.trunk/src/legacy/glue.py", line 251, in removeMe self.userTypingSend.stop() File "/usr/lib/python2.3/site-packages/twisted/internet/task.py", line 68, in stop assert self.running exceptions.AssertionError: -- - Norman Rasmussen - Email: [EMAIL PROTECTED] - Home page: http://norman.rasmussen.co.za/ From [EMAIL PROTECTED] Sun Apr 16 12:20:33 2006 From: [EMAIL PROTECTED] (James Bunton) Date: Sun Apr 16 12:36:21 2006 Subject: [py-transports] Tracebacks In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> On 15/04/2006, at 11:47 PM, Norman Rasmussen wrote: > revision 133: Thanks. Should all be fixed now :) --- James
