def onMessage(self, message):
    'Messages sent to the bot will arrive here. Command handling routing\n        is done in this function.'
    if (not isinstance(message.body, DomishElement)):
        return None
    text = unicode(message.body).encode('utf-8').strip()
    (from_addr, _, _) = message['from'].partition('/')
    self.message_callback(to_addr=self.jid.userhost(), from_addr=from_addr, content=text, transport_type='xmpp', transport_metadata={'xmpp_id': message.getAttribute('id')})
Messages sent to the bot will arrive here. Command handling routing
is done in this function.
def onMessage(self, message):
    'Messages sent to the bot will arrive here. Command handling routing\n        is done in this function.'
    if (not isinstance(message.body, DomishElement)):
        return None
    text = unicode(message.body).encode('utf-8').strip()
    (from_addr, _, _) = message['from'].partition('/')
    self.message_callback(to_addr=self.jid.userhost(), from_addr=from_addr, content=text, transport_type='xmpp', transport_metadata={'xmpp_id': message.getAttribute('id')})