@crysnovax/baileys 2.6.2 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +280 -67
- package/lib/Socket/chats.js +23 -1
- package/lib/Socket/{chats.js[past] → chats.js[old]} +16 -2
- package/lib/Socket/messages-send.js +164 -1
- package/lib/Socket/messages-send.js[old] +1397 -0
- package/lib/Utils/chat-utils.js +14 -0
- package/lib/Utils/chat-utils.js[old] +871 -0
- package/lib/Utils/messages.js +38 -0
- package/lib/Utils/messages.js[old] +1864 -0
- package/package.json +1 -1
package/lib/Utils/chat-utils.js
CHANGED
|
@@ -576,6 +576,20 @@ export const chatModificationToAppPatch = (mod, jid) => {
|
|
|
576
576
|
operation: OP.SET
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
+
// crysnovax@Favorites --- Add/remove JIDs to WA Favorites via favoritesAction sync
|
|
580
|
+
else if ('favorites' in mod) {
|
|
581
|
+
patch = {
|
|
582
|
+
syncAction: {
|
|
583
|
+
favoritesAction: {
|
|
584
|
+
favorites: mod.favorites.jids.map(id => ({ id }))
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
index: ['favorites'],
|
|
588
|
+
type: 'regular_low',
|
|
589
|
+
apiVersion: 5,
|
|
590
|
+
operation: mod.favorites.add ? OP.SET : OP.REMOVE
|
|
591
|
+
};
|
|
592
|
+
}
|
|
579
593
|
else if ('addLabel' in mod) {
|
|
580
594
|
patch = {
|
|
581
595
|
syncAction: {
|