From a4291a27f10d1c90a58747cb99e6451033adb237 Mon Sep 17 00:00:00 2001 From: Roland Pallai Date: Sun, 25 Mar 2018 20:58:12 +0200 Subject: [PATCH] Fix sound playback for received group chat messages Testing for historical messages was broken because `msg_obj.timestamp` second resolution assumed but this is false and this led to broken sound playback for received group chat messages. --- gajim/groupchat_control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gajim/groupchat_control.py b/gajim/groupchat_control.py index af1011a99..76ea9f9db 100644 --- a/gajim/groupchat_control.py +++ b/gajim/groupchat_control.py @@ -1404,7 +1404,7 @@ class GroupchatControl(ChatControlBase): sound = 'received' # Is it a history message? Don't want sound-floods when we join. - if tim != time.mktime(time.localtime()): + if tim - time.mktime(time.localtime()) > 1: sound = None return (highlight, sound)