Bump DOE timer from 3h to 24h
Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import type { ConversationAttributesType } from '../model-types.d';
|
||||
import type { ConversationQueueJobData } from '../jobs/conversationJobQueue';
|
||||
import * as Errors from '../types/errors';
|
||||
import * as durations from './durations';
|
||||
import { DAY } from './durations';
|
||||
import * as log from '../logging/log';
|
||||
import {
|
||||
conversationJobQueue,
|
||||
@@ -20,8 +20,6 @@ import { getRecipientConversationIds } from './getRecipientConversationIds';
|
||||
import { getRecipients } from './getRecipients';
|
||||
import { repeat, zipObject } from './iterables';
|
||||
|
||||
const THREE_HOURS = durations.HOUR * 3;
|
||||
|
||||
export async function sendDeleteForEveryoneMessage(
|
||||
conversationAttributes: ConversationAttributesType,
|
||||
options: {
|
||||
@@ -42,7 +40,7 @@ export async function sendDeleteForEveryoneMessage(
|
||||
const idForLogging = getMessageIdForLogging(message.attributes);
|
||||
|
||||
const timestamp = Date.now();
|
||||
const maxDuration = deleteForEveryoneDuration || THREE_HOURS;
|
||||
const maxDuration = deleteForEveryoneDuration || DAY;
|
||||
if (timestamp - targetTimestamp > maxDuration) {
|
||||
throw new Error(`Cannot send DOE for a message older than ${maxDuration}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user