Consider all messages without contentHint, from us, to be resendable
This commit is contained in:
parent
a532cb41c2
commit
850442bf2d
2 changed files with 7 additions and 2 deletions
|
@ -1209,7 +1209,6 @@ function saveDraft(
|
|||
messageText !== conversation.get('draft') ||
|
||||
!isEqual(bodyRanges, conversation.get('draftBodyRanges'))
|
||||
) {
|
||||
log.info(`saveDraft(${conversation.idForLogging()})`);
|
||||
const now = Date.now();
|
||||
let activeAt = conversation.get('active_at');
|
||||
let timestamp = conversation.get('timestamp');
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue