added hack for Openfire that doesn\'t add xmlns to child iqs of sent body stanzas
This commit is contained in:
parent
3d860f40a6
commit
cecce21c53
|
@ -380,6 +380,7 @@ class XMPPDispatcher(PlugIn):
|
||||||
if not res:
|
if not res:
|
||||||
return
|
return
|
||||||
self._owner.remove_timeout()
|
self._owner.remove_timeout()
|
||||||
|
print self._expected
|
||||||
if self._expected[self._witid] is None:
|
if self._expected[self._witid] is None:
|
||||||
return
|
return
|
||||||
if self.on_responses.has_key(self._witid):
|
if self.on_responses.has_key(self._witid):
|
||||||
|
@ -471,6 +472,7 @@ class BOSHDispatcher(XMPPDispatcher):
|
||||||
return XMPPDispatcher.ProcessNonBlocking(self, data)
|
return XMPPDispatcher.ProcessNonBlocking(self, data)
|
||||||
|
|
||||||
def dispatch(self, stanza, session=None, direct=0):
|
def dispatch(self, stanza, session=None, direct=0):
|
||||||
|
|
||||||
if stanza.getName()=='body' and stanza.getNamespace()==NS_HTTP_BIND:
|
if stanza.getName()=='body' and stanza.getNamespace()==NS_HTTP_BIND:
|
||||||
|
|
||||||
stanza_attrs = stanza.getAttrs()
|
stanza_attrs = stanza.getAttrs()
|
||||||
|
@ -496,6 +498,8 @@ class BOSHDispatcher(XMPPDispatcher):
|
||||||
|
|
||||||
if children:
|
if children:
|
||||||
for child in children:
|
for child in children:
|
||||||
|
if child.getNamespace() == NS_HTTP_BIND:
|
||||||
|
child.setNamespace(self._owner.defaultNamespace)
|
||||||
XMPPDispatcher.dispatch(self, child, session, direct)
|
XMPPDispatcher.dispatch(self, child, session, direct)
|
||||||
else:
|
else:
|
||||||
XMPPDispatcher.dispatch(self, stanza, session, direct)
|
XMPPDispatcher.dispatch(self, stanza, session, direct)
|
||||||
|
|
Loading…
Reference in New Issue