Consider all messages without contentHint, from us, to be resendable

This commit is contained in:
Scott Nonnenberg
2023-04-18 15:49:14 -07:00
committed by GitHub
parent a532cb41c2
commit 850442bf2d
2 changed files with 7 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ import type {
UnidentifiedSenderMessageContent,
} from '@signalapp/libsignal-client';
import {
ContentHint,
CiphertextMessageType,
DecryptionErrorMessage,
groupDecrypt,
@@ -1890,6 +1891,9 @@ export default class MessageReceiver
const uuid = envelope.sourceUuid;
const deviceId = envelope.sourceDevice;
const ourUuid = this.storage.user.getCheckedUuid().toString();
const isFromMe = ourUuid === uuid;
// Job timed out, not a decryption error
if (
error?.name === 'TimeoutError' ||
@@ -1931,7 +1935,9 @@ export default class MessageReceiver
{
cipherTextBytes,
cipherTextType,
contentHint: envelope.contentHint,
contentHint:
envelope.contentHint ??
(isFromMe ? ContentHint.Resendable : undefined),
groupId: envelope.groupId,
receivedAtCounter: envelope.receivedAtCounter,
receivedAtDate: envelope.receivedAtDate,