From ac53b4537c7b40936beeeea140d35a01d9d5f254 Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Mon, 2 Oct 2006 18:03:35 +0000 Subject: [PATCH] ignore messages with no type attribute --- src/common/zeroconf/connection_handlers_zeroconf.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/common/zeroconf/connection_handlers_zeroconf.py b/src/common/zeroconf/connection_handlers_zeroconf.py index 20de350d6..3f23f47d8 100644 --- a/src/common/zeroconf/connection_handlers_zeroconf.py +++ b/src/common/zeroconf/connection_handlers_zeroconf.py @@ -787,20 +787,11 @@ class ConnectionHandlersZeroconf(ConnectionVcard, ConnectionBytestream): subject = subject) self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, subject, chatstate, msg_id, composing_jep, user_nick)) - else: # it's single message + elif mtype == 'normal': # it's single message if self.name not in no_log_for and jid not in no_log_for and msgtxt: gajim.logger.write('single_msg_recv', frm, msgtxt, tim = tim, subject = subject) - if invite is not None: - item = invite.getTag('invite') - jid_from = item.getAttr('from') - if jid_from == None: - jid_from = frm - reason = item.getTagData('reason') - item = invite.getTag('password') - password = invite.getTagData('password') - self.dispatch('GC_INVITATION',(frm, jid_from, reason, password)) - else: + if invite: self.dispatch('MSG', (frm, msgtxt, tim, encrypted, 'normal', subject, chatstate, msg_id, composing_jep, user_nick)) # END messageCB