From f4dbe478eb98b989de8c532113c93abce3b1a14a Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Tue, 20 Jul 2010 09:57:31 +0000 Subject: [PATCH] fix tag handling --- src/connection.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/connection.py b/src/connection.py index 5e36ba97..7871c45d 100644 --- a/src/connection.py +++ b/src/connection.py @@ -127,8 +127,12 @@ class Connection(threading.Thread): """ check if it's a normal or a muc presence """ - x = presence.getTag('x') - if x and x.getAttr('xmlns') == 'http://jabber.org/protocol/muc#user': + is_muc = False + tags = presence.getTags('x') + for tag in tags: + if tag.getAttr('xmlns') == 'http://jabber.org/protocol/muc#user': + is_muc = True + if is_muc: self.handler_muc_presence(connection, presence) else: self.handler_normal_presence(connection, presence)