Never drop unread messages, even when they are older than the history threshold

This commit is contained in:
mjentsch 2015-10-16 00:24:00 +02:00
parent adeacb7c42
commit 76e6c2a4ad

View file

@ -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;
}