mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Added message range to the clear chat action (#1534)
* chat-utils: Added message range to the clear chat action * Chat: add field to type (thanks @Kiss from discord) * Update src/Utils/chat-utils.ts
This commit is contained in:
@@ -94,6 +94,7 @@ export type ChatModification =
|
||||
}
|
||||
| {
|
||||
clear: boolean
|
||||
lastMessages: LastMessageList
|
||||
}
|
||||
| {
|
||||
deleteForMe: { deleteMedia: boolean; key: WAMessageKey; timestamp: number }
|
||||
|
||||
@@ -584,7 +584,9 @@ export const chatModificationToAppPatch = (mod: ChatModification, jid: string) =
|
||||
} else if ('clear' in mod) {
|
||||
patch = {
|
||||
syncAction: {
|
||||
clearChatAction: {} // add message range later
|
||||
clearChatAction: {
|
||||
messageRange: getMessageRange(mod.lastMessages)
|
||||
}
|
||||
},
|
||||
index: ['clearChat', jid, '1' /*the option here is 0 when keep starred messages is enabled*/, '0'],
|
||||
type: 'regular_high',
|
||||
|
||||
Reference in New Issue
Block a user