mirror of
https://github.com/nikdoof/test-auth.git
synced 2026-01-30 16:08:14 +00:00
Fix jabber service not to return a false when provided with a JID
This commit is contained in:
@@ -50,7 +50,11 @@ class JabberService(BaseService):
|
|||||||
|
|
||||||
def check_user(self, username):
|
def check_user(self, username):
|
||||||
""" Check if the username exists """
|
""" Check if the username exists """
|
||||||
res = self.exec_xmlrpc('check_account', user=username, host=self.settings['jabber_server'])
|
if '@' in username:
|
||||||
|
username, server = username.split("@")
|
||||||
|
else:
|
||||||
|
server = self.settings['jabber_server']
|
||||||
|
res = self.exec_xmlrpc('check_account', user=username, host=server)
|
||||||
if res['res'] == 0:
|
if res['res'] == 0:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user