Correctly pass authentication mechs to nbxmpp

This commit is contained in:
Philipp Hörist 2017-10-16 17:04:35 +02:00
parent ed764789f1
commit f234722456
1 changed files with 2 additions and 0 deletions

View File

@ -1408,6 +1408,8 @@ class Connection(CommonConnection, ConnectionHandlers):
log.warning("Unknown authentication mechanisms %s" % mech)
if len(auth_mechs) == 0:
auth_mechs = None
else:
auth_mechs = set(auth_mechs)
con.auth(user=name, password=self.password,
resource=self.server_resource, sasl=True, on_auth=self.__on_auth, auth_mechs=auth_mechs)