don't send resource in bind request if you don't have one
This commit is contained in:
parent
75afefb5c6
commit
9fcd2e93a3
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2010 ICRL
|
Copyright (c) 2010 Nathanael C. Fritz
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -222,9 +222,10 @@ class ClientXMPP(basexmpp, XMLStream):
|
|||||||
def handler_bind_resource(self, xml):
|
def handler_bind_resource(self, xml):
|
||||||
logging.debug("Requesting resource: %s" % self.resource)
|
logging.debug("Requesting resource: %s" % self.resource)
|
||||||
iq = self.Iq(stype='set')
|
iq = self.Iq(stype='set')
|
||||||
res = ET.Element('resource')
|
if self.resource:
|
||||||
res.text = self.resource
|
res = ET.Element('resource')
|
||||||
xml.append(res)
|
res.text = self.resource
|
||||||
|
xml.append(res)
|
||||||
iq.append(xml)
|
iq.append(xml)
|
||||||
response = iq.send()
|
response = iq.send()
|
||||||
#response = self.send(iq, self.Iq(sid=iq['id']))
|
#response = self.send(iq, self.Iq(sid=iq['id']))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user