mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: implement pin chat modification
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user