Do not send retry receipts for messages sent to our PNI.

This commit is contained in:
Greyson Parrelli
2023-08-10 17:10:32 -04:00
committed by Cody Henthorne
parent 28b63e08f1
commit 5688d85789

View File

@@ -261,6 +261,11 @@ object MessageDecryptor {
followUpOperations: MutableList<FollowUpOperation>,
protocolException: ProtocolException
): Result {
if (ServiceId.parseOrNull(envelope.destinationServiceId) == SignalStore.account().pni) {
Log.w(TAG, "${logPrefix(envelope)} Decryption error for message sent to our PNI! Ignoring.")
return Result.Ignore(envelope, serverDeliveredTimestamp, followUpOperations)
}
val contentHint: ContentHint = ContentHint.fromType(protocolException.contentHint)
val senderDevice: Int = protocolException.senderDevice
val receivedTimestamp: Long = System.currentTimeMillis()