diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index a025f9b..31cc424 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -354,7 +354,7 @@ export const makeChatsSocket = (config: SocketConfig) => { const contactUpdates: { [jid: string]: Contact } = {} 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 = { id } if(action?.muteAction) { update.mute = action.muteAction?.muted ? diff --git a/src/Types/Chat.ts b/src/Types/Chat.ts index 2214381..86e86ad 100644 --- a/src/Types/Chat.ts +++ b/src/Types/Chat.ts @@ -10,7 +10,7 @@ export interface PresenceData { 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 = { syncAction: proto.ISyncActionValue