1
0
Fork 1

send delivery receipt when strict discovery timeout is used

(cherry picked from commit 66db477b7137409da5cc8f50d1694b4c6138eb39)
This commit is contained in:
Daniel Gultsch 2024-09-03 09:02:16 +02:00 committed by Arne
parent 144e458ddb
commit d4f8fc3739

View file

@ -1096,10 +1096,14 @@ public class MessageParser extends AbstractParser implements Consumer<im.convers
serverMsgId,
timestamp);
final Contact contact = account.getRoster().getContact(from);
if (mXmppConnectionService.confirmMessages()
&& !contact.isSelf()
&& remoteMsgId != null
&& contact.showInContactList()) {
// this is the same condition that is found in JingleRtpConnection for
// the 'ringing' response. Responding with delivery receipts predates
// the 'ringing' spec'd
final boolean sendReceipts =
(mXmppConnectionService.confirmMessages()
&& contact.showInContactList())
|| Config.JINGLE_MESSAGE_INIT_STRICT_OFFLINE_CHECK;
if (remoteMsgId != null && !contact.isSelf() && sendReceipts) {
processMessageReceipts(account, packet, remoteMsgId, null);
}
} else if ((query != null && query.isCatchup()) || !offlineMessagesRetrieved) {