From 00b7e9823f9ba4af7ad8493d738817e0404207bc Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Thu, 12 Jun 2008 03:56:41 +0000 Subject: [PATCH] fix lack of notification --- src/session.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/session.py b/src/session.py index 3c1ef65bc..917cd2c62 100644 --- a/src/session.py +++ b/src/session.py @@ -183,6 +183,12 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): self.control = ctrl self.control.set_session(self) + # Is it a first or next message received ? + first = False + if not self.control and not gajim.events.get_events(self.conn.name, \ + jid_of_control, [msg_type]): + first = True + if pm: nickname = resource groupchat_control.on_private_message(nickname, msgtxt, tim, @@ -200,17 +206,11 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession): msg = _('Subject: %s') % subject + '\n' + msg focused = False - # Is it a first or next message received ? - first = False - if self.control: parent_win = self.control.parent_win if self.control == parent_win.get_active_control() and \ parent_win.window.has_focus: focused = True - elif not gajim.events.get_events(self.conn.name, \ - jid_of_control, [msg_type]): - first = True notify.notify('new_message', jid_of_control, self.conn.name, [msg_type, first, nickname, msg, focused], advanced_notif_num)