don't play sound when we receive the message we just sent in groupchat. Fixes #6938

This commit is contained in:
Yann Leboulanger 2011-08-08 21:51:31 +02:00
parent 6e24d6c04e
commit 96b1cc524d
1 changed files with 9 additions and 5 deletions

View File

@ -2004,6 +2004,8 @@ class NotificationEvent(nec.NetworkIncomingEvent):
def handle_incoming_gc_msg_event(self, msg_obj): def handle_incoming_gc_msg_event(self, msg_obj):
sound = msg_obj.msg_obj.gc_control.highlighting_for_message( sound = msg_obj.msg_obj.gc_control.highlighting_for_message(
msg_obj.msgtxt, msg_obj.timestamp)[1] msg_obj.msgtxt, msg_obj.timestamp)[1]
if msg_obj.nickname != msg_obj.msg_obj.gc_control.nick:
self.do_sound = True self.do_sound = True
if sound == 'received': if sound == 'received':
self.sound_event = 'muc_message_received' self.sound_event = 'muc_message_received'
@ -2011,6 +2013,8 @@ class NotificationEvent(nec.NetworkIncomingEvent):
self.sound_event = 'muc_message_highlight' self.sound_event = 'muc_message_highlight'
else: else:
self.do_sound = False self.do_sound = False
else:
self.do_sound = False
self.do_popup = False self.do_popup = False