Changes to View Once
This commit is contained in:
parent
9d88abdb90
commit
d42eb2126e
14 changed files with 152 additions and 167 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue