this is more xmpp compliant (thanks Igor)

This commit is contained in:
Yann Leboulanger 2005-03-23 19:14:09 +00:00
parent 2463197d4f
commit 995515e6db
1 changed files with 3 additions and 0 deletions

View File

@ -449,6 +449,9 @@ class Client(Connection):
def sendPresence(self,type=None,priority=None,show=None,status=None,signedStatus=None):
"""Sends a presence protocol element to the server.
Used to inform the server that you are online"""
if type == 'available':
type = None
show = None
presence = Presence(type=type,priority=priority,show=show,status=status)
if signedStatus:
presence.setX(NS_XSIGNED).insertData(signedStatus)