lordceaser-baileys 3.4.8 → 3.4.9

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.
@@ -299,7 +299,22 @@ export const makeChatsSocket = (config) => {
299
299
  const listNode = getBinaryNodeChild(result, 'list');
300
300
  return getBinaryNodeChildren(listNode, 'item').map(n => n.attrs.jid);
301
301
  };
302
- const updateBlockStatus = async (jid, action) => {
302
+ const reportJid = async (jid) => {
303
+ const target = jidNormalizedUser(jid);
304
+ let lastErr;
305
+ for (const flow of ['account_info_report', 'contact_info']) {
306
+ try {
307
+ await query({
308
+ tag: 'iq',
309
+ attrs: { to: S_WHATSAPP_NET, xmlns: 'spam', type: 'set' },
310
+ content: [{ tag: 'spam_list', attrs: { jid: target, spam_flow: flow } }]
311
+ });
312
+ return true;
313
+ } catch (e) { lastErr = e; }
314
+ }
315
+ throw lastErr;
316
+ };
317
+ const updateBlockStatus = async (jid, action) => {
303
318
  const normalizedJid = jidNormalizedUser(jid);
304
319
  let lid;
305
320
  let pn_jid;
@@ -1189,6 +1204,7 @@ export const makeChatsSocket = (config) => {
1189
1204
  updateProfileStatus,
1190
1205
  updateProfileName,
1191
1206
  updateBlockStatus,
1207
+ reportJid,
1192
1208
  updateDisableLinkPreviewsPrivacy,
1193
1209
  updateCallPrivacy,
1194
1210
  updateMessagesPrivacy,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lordceaser-baileys",
3
- "version": "3.4.8",
3
+ "version": "3.4.9",
4
4
  "description": "LordCeaser Baileys v1.0.2 - Cleanest WhatsApp API with Interactive Buttons, List Menus, GStatus Thumbnail Fix, Music/Video URL Import, Polls & More",
5
5
  "main": "index.js",
6
6
  "types": "lib/index.d.ts",
@@ -70,4 +70,4 @@
70
70
  "bundleDependencies": [
71
71
  "libsignal"
72
72
  ]
73
- }
73
+ }