Fix #3051 (always add an id attribute to rawxml IQ set/get)
This commit is contained in:
parent
ce53874927
commit
0627a85483
1 changed files with 4 additions and 3 deletions
|
@ -896,10 +896,11 @@ def command_rawxml(self, args):
|
|||
stanza = args
|
||||
try:
|
||||
stanza = StanzaBase(self.xmpp, xml=ET.fromstring(stanza))
|
||||
if stanza.xml.tag == 'iq' and \
|
||||
stanza.xml.attrib.get('type') in ('get', 'set') and \
|
||||
stanza.xml.attrib.get('id'):
|
||||
if stanza.xml.tag == 'iq' and stanza.xml.attrib.get('type') in ('get', 'set'):
|
||||
iq_id = stanza.xml.attrib.get('id')
|
||||
if not iq_id:
|
||||
iq_id = self.xmpp.new_id()
|
||||
stanza['id'] = iq_id
|
||||
|
||||
def iqfunc(iq):
|
||||
"handler for an iq reply"
|
||||
|
|
Loading…
Reference in a new issue