Do not acknowledge retry receipts sent to PNI.

This commit is contained in:
Greyson Parrelli 2024-02-20 12:24:32 -05:00
parent 7d6a87c825
commit c0a6f2316c

View file

@ -652,7 +652,11 @@ open class MessageContentProcessor(private val context: Context) {
private fun handleIndividualRetryReceipt(requester: Recipient, messageLogEntry: MessageLogEntry?, envelope: Envelope, metadata: EnvelopeMetadata, decryptionErrorMessage: DecryptionErrorMessage) {
var archivedSession = false
// TODO [pnp] Ignore retry receipts that have a PNI destinationUuid
if (ServiceId.parseOrNull(envelope.destinationServiceId) is ServiceId.PNI) {
warn(envelope.timestamp!!, "[RetryReceipt-I] Destination is our PNI. Ignoring.")
return
}
if (decryptionErrorMessage.ratchetKey.isPresent &&
ratchetKeyMatches(requester, metadata.sourceDeviceId, decryptionErrorMessage.ratchetKey.get())
) {