Skip to content

Commit

Permalink
fix: Fixed delete messages for me
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Jun 9, 2024
1 parent bb369c3 commit 5cdf157
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/chat/functions/deleteMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export async function deleteMessage(
type: 'message',
list: [msg],
},
{ clearMedia: deleteMediaInDevice }
deleteMediaInDevice
);
} else {
Cmd.sendDeleteMsgs(chat, [msg], { clearMedia: deleteMediaInDevice });
Expand Down
12 changes: 12 additions & 0 deletions src/whatsapp/misc/Cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export declare class CmdClass extends EventEmitter {
id?: any,
toastPosition?: any
): void;
/** Whatsapp <= 2.3000.1014080102 */
sendDeleteMsgs(
chat: ChatModel,
msg:
Expand All @@ -79,6 +80,17 @@ export declare class CmdClass extends EventEmitter {
toastPosition?: any;
}
): void;
/** Whatsapp >= 2.3000.1014080102 */
sendDeleteMsgs(
chat: ChatModel,
msg:
| {
type: string;
list: MsgModel[];
}
| MsgModel[],
clearMedia?: boolean
): void;
sendRevokeMsgs(
chat: ChatModel,
msg:
Expand Down

0 comments on commit 5cdf157

Please sign in to comment.