aunubaileys 1.0.38 → 1.0.39

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 CHANGED
@@ -64,6 +64,10 @@ Everything else is pure upstream. When upstream moves, we rebase the patch layer
64
64
 
65
65
 
66
66
 
67
+ ### 🆕 What's new in 1.0.39 / Baru di 1.0.39
68
+
69
+ - 📰 **New `sock.newsletterSubscribed()`** — fetch **every newsletter this account follows** in one call, the newsletter analogue of `groupFetchAllParticipating()` that was missing until now (only `newsletterSubscribers(jid)`, the follower count of one newsletter, existed). Implemented over the same MEX path as the other newsletter methods: query id `6388546374527196`, path `xwa2_newsletter_subscribed` (WhatsApp's own MEX schema constants), added to the `QueryIds`/`XWAPaths` enums. Adapted from @itsliaaa/baileys.
70
+
67
71
  ### 🆕 What's new in 1.0.38 / Baru di 1.0.38
68
72
 
69
73
  - 📰 **Ad-reply / link-preview cards as a direct message option** — attaching an `externalAdReply` card (title + thumbnail riding on top of a message) used to mean hand-assembling a full `contextInfo`. Now just pass `externalAdReply: { title, body, url, thumbnail, largeThumbnail }` in the message content: `url` maps to both `mediaUrl` and `sourceUrl`, `mediaType` defaults to 1 (image), and the result merges cleanly with an explicit `contextInfo` and with `mentions`/`mentionAll` when combined. One deliberate difference from the adaptation source (@itsliaaa/baileys): there, a missing `url` is silently replaced with the maintainer's donation link — here a missing url **stays empty**; this library never injects a third-party link into your messages. A non-Buffer thumbnail is rejected with a clear 400 error.
@@ -7,6 +7,7 @@ export declare const makeNewsletterSocket: (sock: GroupsSocket) => {
7
7
  newsletterSubscribers: (jid: string) => Promise<{
8
8
  subscribers: number;
9
9
  }>;
10
+ newsletterSubscribed: () => Promise<unknown>;
10
11
  newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<NewsletterMetadata | null>;
11
12
  newsletterFollow: (jid: string) => Promise<unknown>;
12
13
  newsletterUnfollow: (jid: string) => Promise<unknown>;
@@ -71,6 +71,10 @@ export const makeNewsletterSocket = (sock) => {
71
71
  newsletterSubscribers: async (jid) => {
72
72
  return executeWMexQuery({ newsletter_id: jid }, QueryIds.SUBSCRIBERS, XWAPaths.xwa2_newsletter_subscribers);
73
73
  },
74
+ // AunuBaileys: daftar semua newsletter yang diikuti akun ini (dari @itsliaaa/baileys)
75
+ newsletterSubscribed: async () => {
76
+ return executeWMexQuery({}, QueryIds.SUBSCRIBED, XWAPaths.xwa2_newsletter_subscribed);
77
+ },
74
78
  newsletterMetadata: async (type, key) => {
75
79
  const variables = {
76
80
  fetch_creation_time: true,
@@ -1,6 +1,7 @@
1
1
  export declare enum XWAPaths {
2
2
  xwa2_newsletter_create = "xwa2_newsletter_create",
3
3
  xwa2_newsletter_subscribers = "xwa2_newsletter_subscribers",
4
+ xwa2_newsletter_subscribed = "xwa2_newsletter_subscribed",
4
5
  xwa2_newsletter_view = "xwa2_newsletter_view",
5
6
  xwa2_newsletter_metadata = "xwa2_newsletter",
6
7
  xwa2_newsletter_admin_count = "xwa2_newsletter_admin",
@@ -17,6 +18,7 @@ export declare enum QueryIds {
17
18
  UPDATE_METADATA = "24250201037901610",
18
19
  METADATA = "6563316087068696",
19
20
  SUBSCRIBERS = "9783111038412085",
21
+ SUBSCRIBED = "6388546374527196",
20
22
  FOLLOW = "7871414976211147",
21
23
  UNFOLLOW = "7238632346214362",
22
24
  MUTE = "29766401636284406",
@@ -2,6 +2,7 @@ export var XWAPaths;
2
2
  (function (XWAPaths) {
3
3
  XWAPaths["xwa2_newsletter_create"] = "xwa2_newsletter_create";
4
4
  XWAPaths["xwa2_newsletter_subscribers"] = "xwa2_newsletter_subscribers";
5
+ XWAPaths["xwa2_newsletter_subscribed"] = "xwa2_newsletter_subscribed";
5
6
  XWAPaths["xwa2_newsletter_view"] = "xwa2_newsletter_view";
6
7
  XWAPaths["xwa2_newsletter_metadata"] = "xwa2_newsletter";
7
8
  XWAPaths["xwa2_newsletter_admin_count"] = "xwa2_newsletter_admin";
@@ -21,6 +22,7 @@ export var QueryIds;
21
22
  QueryIds["UPDATE_METADATA"] = "24250201037901610";
22
23
  QueryIds["METADATA"] = "6563316087068696";
23
24
  QueryIds["SUBSCRIBERS"] = "9783111038412085";
25
+ QueryIds["SUBSCRIBED"] = "6388546374527196";
24
26
  QueryIds["FOLLOW"] = "7871414976211147";
25
27
  QueryIds["UNFOLLOW"] = "7238632346214362";
26
28
  QueryIds["MUTE"] = "29766401636284406";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aunubaileys",
3
3
  "type": "module",
4
- "version": "1.0.38",
4
+ "version": "1.0.39",
5
5
  "description": "AunuBaileys \u2014 a WhatsApp Web API for bots that never sleep. Full upstream power with the beloved in-memory store restored and pairing that just works. Forged by AunuCore.",
6
6
  "keywords": [
7
7
  "whatsapp",