From fc99b9e8625af9ec2916ed641de0dc3b093a7cea Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Mon, 9 Aug 2010 20:05:00 +0000 Subject: Fix a little crash, fix the authentication process (was not working with prosody, because it was wrong), fix the sending of the vcard (was broken too, but ejabberd doesn't complain...) --- src/connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/connection.py') diff --git a/src/connection.py b/src/connection.py index 642614dd..ffe42665 100644 --- a/src/connection.py +++ b/src/connection.py @@ -64,8 +64,9 @@ class Connection(threading.Thread): sys.exit(-1) # TODO, become invisible before sendInitPresence self.client.sendInitPresence(requestRoster=0) - self.online = 1 # 2 when confirmation of our auth is received self.register_handlers() + + self.online = 1 # 2 when confirmation of our auth is received while 1: self.process() @@ -145,7 +146,7 @@ class Connection(threading.Thread): if presence.getType() == 'error': self.error_message(presence) return - if fro == toj: # own presence + if not toj or fro == toj: # own presence self.online = 2 self.jid = toj self.handler.emit('on-connected', jid=fro) -- cgit v1.2.3