From 2dbb1bbbeab42275e1f356f52f9af4f0fce14457 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 8 May 2020 00:48:20 +0300 Subject: [PATCH] Do not reply to hidden messages Especially with read receipts, it is wrong, because they are never encrypted and their Message-IDs are not known to other users in a group. --- src/chat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat.rs b/src/chat.rs index 1c766a0cd..45490e1ea 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -385,7 +385,7 @@ impl ChatId { let sql = &context.sql; let query = format!( "SELECT {} \ - FROM msgs WHERE chat_id=? AND state NOT IN (?, ?, ?, ?) \ + FROM msgs WHERE chat_id=? AND state NOT IN (?, ?, ?, ?) AND NOT hidden \ ORDER BY timestamp DESC, id DESC \ LIMIT 1;", fields