Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
77ebc47d by Philipp Hörist at 2018-03-14T23:15:22+01:00
Dont build a session if its not mandatory
Some servers add à `optional` tag to inform us that no session is needed
- - - - -
1 changed file:
- nbxmpp/auth_nb.py
Changes:
=====================================
nbxmpp/auth_nb.py
=====================================
--- a/nbxmpp/auth_nb.py
+++ b/nbxmpp/auth_nb.py
@@ -693,10 +693,13 @@ class NonBlockingBind(PlugIn):
#self.bound='failure'
self.bound = []
return
- if feats.getTag('session', namespace=NS_SESSION):
- self.session = 1
- else:
- self.session = -1
+
+ self.session = -1
+ session = feats.getTag('session', namespace=NS_SESSION):
+ if session is not None:
+ if session.getTag('optional') is None:
+ self.session = 1
+
self.bound = []
def plugout(self):
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/commit/77ebc47d923f0849ddefef1a638761f1c06bf47c
---
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/commit/77ebc47d923f0849ddefef1a638761f1c06bf47c
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits