mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 10:28:03 +01:00
Changes to View Once
This commit is contained in:
@@ -715,7 +715,7 @@ async function exportConversation(conversation, options = {}) {
|
||||
count += 1;
|
||||
|
||||
// skip message if it is disappearing, no matter the amount of time left
|
||||
if (message.expireTimer || message.messageTimer) {
|
||||
if (message.expireTimer || message.messageTimer || message.isViewOnce) {
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,6 @@ module.exports = {
|
||||
getOutgoingWithoutExpiresAt,
|
||||
getNextExpiringMessage,
|
||||
getMessagesByConversation,
|
||||
getNextTapToViewMessageToExpire,
|
||||
getNextTapToViewMessageToAgeOut,
|
||||
getTapToViewMessagesNeedingErase,
|
||||
|
||||
@@ -842,14 +841,6 @@ async function getNextExpiringMessage({ MessageCollection }) {
|
||||
return new MessageCollection(messages);
|
||||
}
|
||||
|
||||
async function getNextTapToViewMessageToExpire({ Message }) {
|
||||
const message = await channels.getNextTapToViewMessageToExpire();
|
||||
if (!message) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Message(message);
|
||||
}
|
||||
async function getNextTapToViewMessageToAgeOut({ Message }) {
|
||||
const message = await channels.getNextTapToViewMessageToAgeOut();
|
||||
if (!message) {
|
||||
|
||||
@@ -169,10 +169,14 @@ function initializeMigrations({
|
||||
const writeNewTempData = createWriterForNew(tempPath);
|
||||
const deleteTempFile = Attachments.createDeleter(tempPath);
|
||||
const readTempData = createReader(tempPath);
|
||||
const copyIntoTempDirectory = Attachments.copyIntoAttachmentsDirectory(
|
||||
tempPath
|
||||
);
|
||||
|
||||
return {
|
||||
attachmentsPath,
|
||||
copyIntoAttachmentsDirectory,
|
||||
copyIntoTempDirectory,
|
||||
deleteAttachmentData: deleteOnDisk,
|
||||
deleteExternalMessageFiles: MessageType.deleteAllExternalFiles({
|
||||
deleteAttachmentData: Type.deleteData(deleteOnDisk),
|
||||
@@ -182,6 +186,7 @@ function initializeMigrations({
|
||||
deleteTempFile,
|
||||
getAbsoluteAttachmentPath,
|
||||
getAbsoluteStickerPath,
|
||||
getAbsoluteTempPath,
|
||||
getPlaceholderMigrations,
|
||||
getCurrentVersion,
|
||||
loadAttachmentData,
|
||||
|
||||
Reference in New Issue
Block a user