summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sleekxmpp/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py
index cc1ca36e..80b1c05f 100644
--- a/sleekxmpp/__init__.py
+++ b/sleekxmpp/__init__.py
@@ -271,8 +271,8 @@ class ClientXMPP(basexmpp, XMLStream):
logging.debug("Requesting resource: %s" % self.resource)
res = ET.Element('resource')
res.text = self.resource
- iq = self.makeIqSet(res)
- iq.append(xml)
+ xml.append(res)
+ iq = self.makeIqSet(xml)
response = iq.send(priority=2,init=True)
#response = self.send(iq, self.Iq(sid=iq['id']))
self.set_jid(response.xml.find('{urn:ietf:params:xml:ns:xmpp-bind}bind/{urn:ietf:params:xml:ns:xmpp-bind}jid').text)