Commit a1c352f2 authored by Philipp Hörist's avatar Philipp Hörist

XMLConsole: Inject jabber:client into message, presence and iq

parent 2c4f4d1e
......@@ -172,10 +172,18 @@ def _on_send(self, *args):
stanza = buffer_.get_text(begin_iter, end_iter, True)
if stanza:
node = nbxmpp.Protocol(node=stanza)
node = nbxmpp.Node(node=stanza)
except Exception as error:
ErrorDialog(_('Invalid Node'), str(error))
if node.getName() in ('message', 'presence', 'iq'):
# Parse stanza again if its a message, presence or iq and
# set jabber:client as toplevel namespace
# Use type Protocol so nbxmpp counts the stanza for
# stream management
node = nbxmpp.Protocol(node=stanza,
attrs={'xmlns': 'jabber:client'})
self.last_stanza = stanza
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment