Mercurial > moin > 1.9
changeset 2104:c2114faf540e
Fix the case when pyxmpp returns None instead of "available" as presence type.
author | Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> |
---|---|
date | Thu, 07 Jun 2007 12:39:33 +0200 |
parents | 42a4a659968a |
children | cc5067ea1235 |
files | JabberBot/xmppbot.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/JabberBot/xmppbot.py Thu Jun 07 00:06:45 2007 +0200 +++ b/JabberBot/xmppbot.py Thu Jun 07 12:39:33 2007 +0200 @@ -296,6 +296,9 @@ self.log("Handling available presence.") show = presence.get_show() + if show is None: + show = u'available' + priority = presence.get_priority() jid = presence.get_from_jid() bare_jid = jid.bare().as_utf8() @@ -312,7 +315,7 @@ contact.add_resource(jid.resource, show, priority) if self.config.verbose: - self.log(contact) + self.log(contact) # Either way check, if we can deliver queued messages now if not contact.is_dnd():