def toElement(self):
    element = xmppim.AvailabilityPresence.toElement(self)
    muc = element.addElement((NS_MUC, 'x'))
    if self.password:
        muc.addElement('password', content=self.password)
    if self.history:
        muc.addChild(self.history.toElement())
    return element
def toElement(self):
    element = xmppim.AvailabilityPresence.toElement(self)
    muc = element.addElement((NS_MUC, 'x'))
    if self.password:
        muc.addElement('password', content=self.password)
    if self.history:
        muc.addChild(self.history.toElement())
    return element