From 76e6c2a4ad7f3b29bb1e8f7e530de14d8a350f4f Mon Sep 17 00:00:00 2001 From: mjentsch Date: Fri, 16 Oct 2015 00:24:00 +0200 Subject: [PATCH] Never drop unread messages, even when they are older than the history threshold --- tgp-msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgp-msg.c b/tgp-msg.c index 76a5e2b..3980d60 100644 --- a/tgp-msg.c +++ b/tgp-msg.c @@ -607,7 +607,7 @@ void tgp_msg_recv (struct tgl_state *TLS, struct tgl_message *M) { if (!(M->flags & TGLMF_CREATED)) { return; } - if (M->date != 0 && M->date < tgp_msg_oldest_relevant_ts (TLS)) { + if (!(M->flags | TGLMF_UNREAD) && M->date != 0 && M->date < tgp_msg_oldest_relevant_ts (TLS)) { debug ("Message from %d on %d too old, ignored.", tgl_get_peer_id (M->from_id), M->date); return; }