diff options
author | Nathan Fritz <nathan@andyet.net> | 2010-07-20 11:15:59 -0700 |
---|---|---|
committer | Nathan Fritz <nathan@andyet.net> | 2010-07-20 11:15:59 -0700 |
commit | 9fcd2e93a360939b5a55af93239b467a7ac32028 (patch) | |
tree | 00ad3f967b22e2610c4c8b0895e285824e1112ba /sleekxmpp | |
parent | 75afefb5c66c7d8a5ba7fa7bdcc3f87e69936ec5 (diff) | |
download | slixmpp-9fcd2e93a360939b5a55af93239b467a7ac32028.tar.gz slixmpp-9fcd2e93a360939b5a55af93239b467a7ac32028.tar.bz2 slixmpp-9fcd2e93a360939b5a55af93239b467a7ac32028.tar.xz slixmpp-9fcd2e93a360939b5a55af93239b467a7ac32028.zip |
don't send resource in bind request if you don't have one
Diffstat (limited to 'sleekxmpp')
-rw-r--r-- | sleekxmpp/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py index b680ddaf..16fd1056 100644 --- a/sleekxmpp/__init__.py +++ b/sleekxmpp/__init__.py @@ -222,9 +222,10 @@ class ClientXMPP(basexmpp, XMLStream): def handler_bind_resource(self, xml): logging.debug("Requesting resource: %s" % self.resource) iq = self.Iq(stype='set') - res = ET.Element('resource') - res.text = self.resource - xml.append(res) + if self.resource: + res = ET.Element('resource') + res.text = self.resource + xml.append(res) iq.append(xml) response = iq.send() #response = self.send(iq, self.Iq(sid=iq['id'])) |