Remove 10-edit limit for note to self

This commit is contained in:
yash-signal
2024-10-11 11:30:10 -05:00
committed by GitHub
parent f3aae86796
commit d42df4b201
3 changed files with 26 additions and 25 deletions

View File

@@ -24,6 +24,7 @@ import { isDirectConversation } from './whatTypeOfConversation';
import { isTooOldToModifyMessage } from './isTooOldToModifyMessage';
import { queueAttachmentDownloads } from './queueAttachmentDownloads';
import { modifyTargetMessage } from './modifyTargetMessage';
import { isMessageNoteToSelf } from './isMessageNoteToSelf';
const RECURSION_LIMIT = 15;
@@ -92,12 +93,10 @@ export async function handleEditMessage(
}
const { serverTimestamp } = editAttributes.message;
const isNoteToSelf =
mainMessage.conversationId ===
window.ConversationController.getOurConversationId();
if (
serverTimestamp &&
!isNoteToSelf &&
!isMessageNoteToSelf(mainMessage) &&
isTooOldToModifyMessage(serverTimestamp, mainMessage)
) {
log.warn(`${idLog}: cannot edit message older than 48h`, serverTimestamp);