def toElement(self):
    element = xmppim.Message.toElement(self)
    child = element.addElement((NS_MUC_USER, 'x'))
    child.addElement('invite')
    child.invite['to'] = self.invitee.full()
    if self.reason:
        child.invite.addElement('reason', content=self.reason)
    return element
def toElement(self):
    element = xmppim.Message.toElement(self)
    child = element.addElement((NS_MUC_USER, 'x'))
    child.addElement('invite')
    child.invite['to'] = self.invitee.full()
    if self.reason:
        child.invite.addElement('reason', content=self.reason)
    return element