fix: foundMessage has the ttl updated by reference

no need to explicitly assign it
pull/2971/head
William Grant 2 years ago
parent 40014544d1
commit bd9d56d381

@ -158,7 +158,7 @@ async function send(
!isEmpty(batchResult[0].body.hash)
) {
const messageSendHash = batchResult[0].body.hash;
let foundMessage = await Data.getMessageById(encryptedAndWrapped.identifier);
const foundMessage = await Data.getMessageById(encryptedAndWrapped.identifier);
if (foundMessage) {
await foundMessage.updateMessageHash(messageSendHash);
const convo = foundMessage.getConversation();
@ -185,7 +185,7 @@ async function send(
canBeDeleteAfterRead &&
(expirationMode === 'legacy' || expirationMode === 'deleteAfterRead')
) {
foundMessage = await updateMessageExpiryOnSwarm(foundMessage, 'send()');
await updateMessageExpiryOnSwarm(foundMessage, 'send()');
}
}

Loading…
Cancel
Save