do not play sound when standalone chatstate message
This commit is contained in:
parent
2db64d9ce8
commit
c851323c51
|
@ -900,7 +900,7 @@ class Connection:
|
||||||
|
|
||||||
# chatstates - if peer supports jep85, send chatstates
|
# chatstates - if peer supports jep85, send chatstates
|
||||||
# please note that the only valid tag inside a message containing a <body> tag is the active event
|
# please note that the only valid tag inside a message containing a <body> tag is the active event
|
||||||
if chatstate != None:
|
if chatstate is not None:
|
||||||
msg_iq.setTag(chatstate, {}, namespace='http://jabber.org/protocol/chatstates')
|
msg_iq.setTag(chatstate, {}, namespace='http://jabber.org/protocol/chatstates')
|
||||||
|
|
||||||
self.to_be_sent.append(msg_iq)
|
self.to_be_sent.append(msg_iq)
|
||||||
|
|
|
@ -459,7 +459,9 @@ class Interface:
|
||||||
|
|
||||||
def handle_event_msgsent(self, account, array):
|
def handle_event_msgsent(self, account, array):
|
||||||
#('MSGSENT', account, (jid, msg, keyID))
|
#('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')
|
self.play_sound('message_sent')
|
||||||
|
|
||||||
def handle_event_subscribe(self, account, array):
|
def handle_event_subscribe(self, account, array):
|
||||||
|
|
Loading…
Reference in New Issue