summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-09 20:05:00 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-09 20:05:00 +0000
commitfc99b9e8625af9ec2916ed641de0dc3b093a7cea (patch)
tree66973641b745a8897e488be68d50517a524ae440 /src/connection.py
parent31ab762ab6ced58c055b3225342f21d14cf0aafd (diff)
downloadpoezio-fc99b9e8625af9ec2916ed641de0dc3b093a7cea.tar.gz
poezio-fc99b9e8625af9ec2916ed641de0dc3b093a7cea.tar.bz2
poezio-fc99b9e8625af9ec2916ed641de0dc3b093a7cea.tar.xz
poezio-fc99b9e8625af9ec2916ed641de0dc3b093a7cea.zip
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...)
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py5
1 files changed, 3 insertions, 2 deletions
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)