Do not trigger notifications for edited messages

This commit is contained in:
Josh Perez 2023-06-29 22:32:25 -04:00 committed by GitHub
parent f90c2b7479
commit 45b4a7da56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,6 @@ import { isIncoming, isOutgoing } from '../messages/helpers';
import { isOlderThan } from './timestamp';
import { isDirectConversation } from './whatTypeOfConversation';
import { queueAttachmentDownloads } from './queueAttachmentDownloads';
import { shouldReplyNotifyUser } from './shouldReplyNotifyUser';
export async function handleEditMessage(
mainMessage: MessageAttributesType,
@ -291,10 +290,5 @@ export async function handleEditMessage(
// Clear typing indicator
const typingToken = `${editAttributes.fromId}.${editAttributes.fromDevice}`;
conversation.clearContactTypingTimer(typingToken);
// Update notifications
if (await shouldReplyNotifyUser(mainMessageModel, conversation)) {
await conversation.notify(mainMessageModel);
}
}
}