From c3670ea4eb41f3a6b38232c35fb3588eae0861c0 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Sun, 27 Nov 2005 15:45:54 +0000 Subject: [PATCH] when a message a no type, we must consider it as type=normal as explained in RFC3921 --- src/common/connection.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 9e32d3828c..a6441c95bf 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -365,7 +365,14 @@ class Connection: return self.dispatch('GC_MSG', (frm, msgtxt, tim)) gajim.logger.write('gc_msg', frm, msgtxt, tim = tim) - elif mtype == 'normal': # it's single message + elif mtype == 'chat': # it's type 'chat' + if not msg.getTag('body') and chatstate is None: #no <body> + return + if msg.getTag('body'): + gajim.logger.write('chat_msg_recv', frm, msgtxt, tim = tim, subject = subject) + self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, subject, + chatstate)) + else: # it's single message gajim.logger.write('single_msg_recv', frm, msgtxt, tim = tim, subject = subject) if invite is not None: item = invite.getTag('invite') @@ -377,13 +384,6 @@ class Connection: else: self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, subject, None)) - else: # it's type 'chat' - if not msg.getTag('body') and chatstate is None: #no <body> - return - if msg.getTag('body'): - gajim.logger.write('chat_msg_recv', frm, msgtxt, tim = tim, subject = subject) - self.dispatch('MSG', (frm, msgtxt, tim, encrypted, mtype, subject, - chatstate)) # END messageCB def _presenceCB(self, con, prs): -- GitLab