refactor: include full sync action in chatmutation

This commit is contained in:
Adhiraj Singh
2021-11-25 13:35:57 +05:30
parent b3e0f26ec0
commit 032b2a314b
2 changed files with 2 additions and 2 deletions

View File

@@ -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<Chat> = { id }
if(action?.muteAction) {
update.mute = action.muteAction?.muted ?

View File

@@ -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