mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: include full sync action in chatmutation
This commit is contained in:
@@ -354,7 +354,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
const contactUpdates: { [jid: string]: Contact } = {}
|
const contactUpdates: { [jid: string]: Contact } = {}
|
||||||
const msgDeletes: proto.IMessageKey[] = []
|
const msgDeletes: proto.IMessageKey[] = []
|
||||||
|
|
||||||
for(const { action, index: [_, id, msgId, fromMe] } of actions) {
|
for(const { syncAction: { value: action }, index: [_, id, msgId, fromMe] } of actions) {
|
||||||
const update: Partial<Chat> = { id }
|
const update: Partial<Chat> = { id }
|
||||||
if(action?.muteAction) {
|
if(action?.muteAction) {
|
||||||
update.mute = action.muteAction?.muted ?
|
update.mute = action.muteAction?.muted ?
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export interface PresenceData {
|
|||||||
lastSeen?: number
|
lastSeen?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ChatMutation = { action: proto.ISyncActionValue, index: string[], indexMac: Uint8Array, valueMac: Uint8Array, operation: number }
|
export type ChatMutation = { syncAction: proto.ISyncActionData, index: string[], indexMac: Uint8Array, valueMac: Uint8Array, operation: number }
|
||||||
|
|
||||||
export type WAPatchCreate = {
|
export type WAPatchCreate = {
|
||||||
syncAction: proto.ISyncActionValue
|
syncAction: proto.ISyncActionValue
|
||||||
|
|||||||
Reference in New Issue
Block a user