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,11 +2004,15 @@ class NotificationEvent(nec.NetworkIncomingEvent):
def handle_incoming_gc_msg_event(self, msg_obj):
sound = msg_obj.msg_obj.gc_control.highlighting_for_message(
msg_obj.msgtxt, msg_obj.timestamp)[1]
self.do_sound = True
if sound == 'received':
self.sound_event = 'muc_message_received'
elif sound == 'highlight':
self.sound_event = 'muc_message_highlight'
if msg_obj.nickname != msg_obj.msg_obj.gc_control.nick:
self.do_sound = True
if sound == 'received':
self.sound_event = 'muc_message_received'
elif sound == 'highlight':
self.sound_event = 'muc_message_highlight'
else:
self.do_sound = False
else:
self.do_sound = False