@crysnovax/baileys 2.6.2 → 2.6.3

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.
@@ -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: {