Don't send <show>None</show> presence. fixed #1666

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-07-22 17:47:34 +00:00
parent f7c8c2b192
commit 3afa155cfb
3 changed files with 11 additions and 6 deletions

View file

@ -2,7 +2,11 @@ This file describes the new features in each poezio release.
For more detailed changelog, see the roadmap: For more detailed changelog, see the roadmap:
http://codingteam.net/project/poezio/roadmap http://codingteam.net/project/poezio/roadmap
* Poezio 0.6.2 - dev * Poezio 0.7 - dev
Complete the MUC support
- bugfixes
* Poezio 0.6.2 - 21 Jul 2010
- Lines are now broken between words and not in the middle of them - Lines are now broken between words and not in the middle of them
- /unquery command - /unquery command
- default nickname is now $USER - default nickname is now $USER

View file

@ -744,10 +744,10 @@ class Gui(object):
""" """
/show <status> [msg] /show <status> [msg]
""" """
possible_show = {'avail':'None', possible_show = {'avail':None,
'available':'None', 'available':None,
'ok':'None', 'ok':None,
'here':'None', 'here':None,
'chat':'chat', 'chat':'chat',
'away':'away', 'away':'away',
'afk':'away', 'afk':'away',

View file

@ -291,7 +291,8 @@ class MultiUserChat(object):
def change_show(self, room, nick, show, status): def change_show(self, room, nick, show, status):
pres = Presence(to='%s/%s' % (room, nick)) pres = Presence(to='%s/%s' % (room, nick))
pres.setShow(show) if show: # if show is None, don't put a <show /> tag. It means "online"
pres.setShow(show)
if status: if status:
pres.setStatus(status) pres.setStatus(status)
self.connection.send(pres) self.connection.send(pres)