From eac75afbe21d8304563548424250054264fa30d0 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Thu, 25 Nov 2021 15:21:33 +0530 Subject: [PATCH] fix: do not call REMOVE op for mutations --- src/Utils/chat-utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Utils/chat-utils.ts b/src/Utils/chat-utils.ts index 0b8baf5..342be90 100644 --- a/src/Utils/chat-utils.ts +++ b/src/Utils/chat-utils.ts @@ -436,7 +436,7 @@ export const chatModificationToAppPatch = ( index: ['mute', jid], type: 'regular_high', apiVersion: 2, - operation: mod.mute ? OP.SET : OP.REMOVE + operation: OP.SET } } else if('archive' in mod) { patch = { @@ -449,7 +449,7 @@ export const chatModificationToAppPatch = ( index: ['archive', jid], type: 'regular_low', apiVersion: 3, - operation: mod.archive ? OP.SET : OP.REMOVE + operation: OP.SET } } else if('markRead' in mod) { patch = { @@ -462,7 +462,7 @@ export const chatModificationToAppPatch = ( index: ['markChatAsRead', jid], type: 'regular_low', apiVersion: 3, - operation: !mod.markRead ? OP.SET : OP.REMOVE + operation: OP.SET } } else if('clear' in mod) { if(mod.clear === 'all') { @@ -491,7 +491,7 @@ export const chatModificationToAppPatch = ( index: ['pin_v1', '919646328797@s.whatsapp.net'], type: 'regular_low', apiVersion: 5, - operation: mod.pin ? OP.SET : OP.REMOVE + operation: OP.SET } } else { throw new Boom('not supported')