feat: implement pin chat modification

This commit is contained in:
Adhiraj Singh
2021-11-25 13:36:29 +05:30
parent 032b2a314b
commit ddf6daba65
2 changed files with 15 additions and 0 deletions

View File

@@ -481,6 +481,18 @@ export const chatModificationToAppPatch = (
operation: OP.SET
}
}
} else if('pin' in mod) {
patch = {
syncAction: {
pinAction: {
pinned: !!mod.pin
}
},
index: ['pin_v1', '919646328797@s.whatsapp.net'],
type: 'regular_low',
apiVersion: 5,
operation: mod.pin ? OP.SET : OP.REMOVE
}
} else {
throw new Boom('not supported')
}