From abd0711bc71b5d03923ebe999b96679e4e305210 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Mon, 1 Aug 2022 15:19:05 +0300 Subject: [PATCH] fixes --- src/Socket/messages-send.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index e8b6ce5..dad68a6 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -621,7 +621,7 @@ export const makeMessagesSocket = (config: SocketConfig) => { // required for delete if(isDeleteMsg) { // if the chat is a group, and I am not the author, then delete the message as an admin - if (content.delete.remoteJid.endsWith('@g.us') && !content.fromMe) { + if (content.delete?.remoteJid?.endsWith('@g.us') && !content.delete?.fromMe) { additionalAttributes.edit = '8' } else { additionalAttributes.edit = '7'