Skip to content
Snippets Groups Projects
Commit 7c0dca4d authored by nkour's avatar nkour
Browse files

chatstates handling is back again. now with comment why this should stay where...

chatstates handling is back again. now with comment why this should stay where it is. also do and if-if a if-elif [thanks Jim for this]
parent 0bd9e77f
No related branches found
No related tags found
No related merge requests found
......@@ -451,8 +451,7 @@ def handle_event_notify(self, account, array):
def handle_event_msg(self, account, array):
# ('MSG', account, (jid, msg, time, encrypted, msg_type, subject,
# chatstate))
if not array[1]: # empty message text
return
jid = gajim.get_jid_without_resource(array[0])
resource = gajim.get_resource_from_jid(array[0])
......@@ -473,8 +472,8 @@ def handle_event_msg(self, account, array):
if gajim.config.get_per('soundevents', 'first_message_received',
'enabled') and first:
helpers.play_sound('first_message_received')
if gajim.config.get_per('soundevents', 'next_message_received',
'enabled') and not first:
elif gajim.config.get_per('soundevents', 'next_message_received',
'enabled'):
helpers.play_sound('next_message_received')
jid_of_control = jid
......@@ -538,6 +537,10 @@ def handle_event_msg(self, account, array):
if msg_id: # Do not overwrite an existing msg_id with None
contact.msg_id = msg_id
# THIS MUST BE AFTER chatstates handling
if not array[1]: # empty message text
return
if not chat_control and not gajim.awaiting_events[account].has_key(jid):
if gajim.config.get('notify_on_new_message'):
if helpers.allow_showing_notification(account):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment