From 8b7abe6f7df423bbefc45e71c6076e316d55bf14 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 18 May 2022 01:00:23 +0300 Subject: [PATCH] Don't send read receipts for errored messages --- database/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/message.go b/database/message.go index 0361398..993e9e5 100644 --- a/database/message.go +++ b/database/message.go @@ -64,7 +64,7 @@ const ( ` getMessagesBetweenQuery = ` SELECT chat_jid, chat_receiver, jid, mxid, sender, timestamp, sent, type, error, broadcast_list_jid FROM message - WHERE chat_jid=$1 AND chat_receiver=$2 AND timestamp>$3 AND timestamp<=$4 AND sent=true ORDER BY timestamp ASC + WHERE chat_jid=$1 AND chat_receiver=$2 AND timestamp>$3 AND timestamp<=$4 AND sent=true AND error='' ORDER BY timestamp ASC ` )