From 4b96e3cb34615f9acb453d1e0945fef9a8b29c48 Mon Sep 17 00:00:00 2001 From: mjentsch Date: Sun, 2 Aug 2015 19:52:30 +0200 Subject: [PATCH] Do not display notifications and sounds for messages that were already read on other devices This should make receiving message history a little less annoying when not using the client for a long time, while still getting the full history in your log. --- tgp-msg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tgp-msg.c b/tgp-msg.c index bb4ae4f..36fadf5 100644 --- a/tgp-msg.c +++ b/tgp-msg.c @@ -415,6 +415,10 @@ static void tgp_msg_display (struct tgl_state *TLS, struct tgp_msg_loading *C) { flags |= PURPLE_MESSAGE_RECV; } + if (! (M->flags & TGLMF_UNREAD)) { + flags |= PURPLE_MESSAGE_DELAYED; + } + if (! str_not_empty (text)) { warning ("No text to display"); return;