diff --git a/src/common/connection.py b/src/common/connection.py index a59b56a03..daf67b98f 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -900,7 +900,7 @@ class Connection: # chatstates - if peer supports jep85, send chatstates # please note that the only valid tag inside a message containing a tag is the active event - if chatstate != None: + if chatstate is not None: msg_iq.setTag(chatstate, {}, namespace='http://jabber.org/protocol/chatstates') self.to_be_sent.append(msg_iq) diff --git a/src/gajim.py b/src/gajim.py index e4359d2a1..711566e7d 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -459,7 +459,9 @@ class Interface: def handle_event_msgsent(self, account, array): #('MSGSENT', account, (jid, msg, keyID)) - if gajim.config.get_per('soundevents', 'message_sent', 'enabled'): + msg = array[1] + # do not play sound when standalone chatstate message (eg no msg) + if msg and gajim.config.get_per('soundevents', 'message_sent', 'enabled'): self.play_sound('message_sent') def handle_event_subscribe(self, account, array):