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') ||
|
messageText !== conversation.get('draft') ||
|
||||||
!isEqual(bodyRanges, conversation.get('draftBodyRanges'))
|
!isEqual(bodyRanges, conversation.get('draftBodyRanges'))
|
||||||
) {
|
) {
|
||||||
log.info(`saveDraft(${conversation.idForLogging()})`);
|
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
let activeAt = conversation.get('active_at');
|
let activeAt = conversation.get('active_at');
|
||||||
let timestamp = conversation.get('timestamp');
|
let timestamp = conversation.get('timestamp');
|
||||||
|
|
|
@ -13,6 +13,7 @@ import type {
|
||||||
UnidentifiedSenderMessageContent,
|
UnidentifiedSenderMessageContent,
|
||||||
} from '@signalapp/libsignal-client';
|
} from '@signalapp/libsignal-client';
|
||||||
import {
|
import {
|
||||||
|
ContentHint,
|
||||||
CiphertextMessageType,
|
CiphertextMessageType,
|
||||||
DecryptionErrorMessage,
|
DecryptionErrorMessage,
|
||||||
groupDecrypt,
|
groupDecrypt,
|
||||||
|
@ -1890,6 +1891,9 @@ export default class MessageReceiver
|
||||||
const uuid = envelope.sourceUuid;
|
const uuid = envelope.sourceUuid;
|
||||||
const deviceId = envelope.sourceDevice;
|
const deviceId = envelope.sourceDevice;
|
||||||
|
|
||||||
|
const ourUuid = this.storage.user.getCheckedUuid().toString();
|
||||||
|
const isFromMe = ourUuid === uuid;
|
||||||
|
|
||||||
// Job timed out, not a decryption error
|
// Job timed out, not a decryption error
|
||||||
if (
|
if (
|
||||||
error?.name === 'TimeoutError' ||
|
error?.name === 'TimeoutError' ||
|
||||||
|
@ -1931,7 +1935,9 @@ export default class MessageReceiver
|
||||||
{
|
{
|
||||||
cipherTextBytes,
|
cipherTextBytes,
|
||||||
cipherTextType,
|
cipherTextType,
|
||||||
contentHint: envelope.contentHint,
|
contentHint:
|
||||||
|
envelope.contentHint ??
|
||||||
|
(isFromMe ? ContentHint.Resendable : undefined),
|
||||||
groupId: envelope.groupId,
|
groupId: envelope.groupId,
|
||||||
receivedAtCounter: envelope.receivedAtCounter,
|
receivedAtCounter: envelope.receivedAtCounter,
|
||||||
receivedAtDate: envelope.receivedAtDate,
|
receivedAtDate: envelope.receivedAtDate,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue