Patch for Status/Presence updates in PyYIMt (yahoo/jabber transport)

Posted by Frank Cort Wed, 21 May 2008 17:37:00 GMT

     

We recently launched a real-time question/answer service called “AskMeGo”. It is essentially Yahoo! Answers except we connect users up using Instant Messaging networks and encourage 1-1 chatting to take place. This is timely because Yahoo! Answers has recently come down and banned chatting on its site.

Anyhow, our backend (for the time being) is built on top of Jabber and the various python transports available for the popular IM networks. Status/Presence updates are extremely important to us because it lets us advertise (anonymously) whether a user is online or offline on our website.

We found that the Yahoo python transport (PyYIMt) wasn’t handling some of the edge cases when it comes to status/presence updates. Specifically we were having trouble with the following cases

  • When adding a new yahoo user to the roster, the presence update for the new user wasn’t coming through properly.
  • When a yahoo user on our roster went from “Invisible to All” to “Available”… we wouldn’t always get the update properly.
  • When a yahoo user on our roster went from “Idle” to “Available”… we wouldn’t always get the update properly.
  • When a yahoo user on our roster had set their status to “busy” (or one of the other canned statuses) and we came online… we wouldn’t see that status.

Some of the issues are due to some changes in some of the newer Yahoo! Messenger clients. But, the transport’s status update code was a bit off too.

So, I ended up creating a patch for the transport and PyYIMt’s author/maintainer (Norman Rasmussen) asked that I post it somewhere. So here it is:

I had never touched a lick of Python code before digging into PyYIMt… so if there is a better way to organize it. Let me know.

Trackbacks

Use the following link to trackback from your own site:
http://www.devdots.com/trackbacks?article_id=patch-for-status-updates-in-pyyimt-yahoo-jabber-transport&day=21&month=05&year=2008

  1. My latest project is now in public beta: AskMeGo. It's a site that lets you find other people based on a shared interest in a certain topic.Anyone can register on the site and choose categories that they'd like to chat...
Comments

Leave a response

Comments


http://typosphere.org' %> / styled with scribbish