junexbaileys 1.1.6 → 1.1.8

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.
Files changed (68) hide show
  1. package/WAProto/WAProto.proto +9 -0
  2. package/WAProto/index.d.ts +26 -0
  3. package/WAProto/index.js +207 -0
  4. package/lib/Defaults/index.d.ts +3 -0
  5. package/lib/Defaults/index.d.ts.map +1 -1
  6. package/lib/Defaults/index.js +11 -0
  7. package/lib/Defaults/index.js.map +1 -1
  8. package/lib/Socket/business.d.ts +24 -0
  9. package/lib/Socket/business.d.ts.map +1 -1
  10. package/lib/Socket/channelPollVote.d.ts +44 -0
  11. package/lib/Socket/channelPollVote.d.ts.map +1 -0
  12. package/lib/Socket/channelPollVote.js +65 -0
  13. package/lib/Socket/channelPollVote.js.map +1 -0
  14. package/lib/Socket/channelSchedule.d.ts +229 -0
  15. package/lib/Socket/channelSchedule.d.ts.map +1 -0
  16. package/lib/Socket/channelSchedule.js +462 -0
  17. package/lib/Socket/channelSchedule.js.map +1 -0
  18. package/lib/Socket/channelStatus.d.ts +223 -0
  19. package/lib/Socket/channelStatus.d.ts.map +1 -1
  20. package/lib/Socket/channelStatus.js +312 -1
  21. package/lib/Socket/channelStatus.js.map +1 -1
  22. package/lib/Socket/chats.d.ts +1 -0
  23. package/lib/Socket/chats.d.ts.map +1 -1
  24. package/lib/Socket/chats.js +1 -0
  25. package/lib/Socket/chats.js.map +1 -1
  26. package/lib/Socket/communities.d.ts +24 -0
  27. package/lib/Socket/communities.d.ts.map +1 -1
  28. package/lib/Socket/groups.d.ts +1 -0
  29. package/lib/Socket/groups.d.ts.map +1 -1
  30. package/lib/Socket/index.d.ts +24 -0
  31. package/lib/Socket/index.d.ts.map +1 -1
  32. package/lib/Socket/messages-recv.d.ts +24 -0
  33. package/lib/Socket/messages-recv.d.ts.map +1 -1
  34. package/lib/Socket/messages-send.d.ts +35 -4
  35. package/lib/Socket/messages-send.d.ts.map +1 -1
  36. package/lib/Socket/messages-send.js +99 -3
  37. package/lib/Socket/messages-send.js.map +1 -1
  38. package/lib/Socket/mex.d.ts +9 -1
  39. package/lib/Socket/mex.d.ts.map +1 -1
  40. package/lib/Socket/mex.js +199 -2
  41. package/lib/Socket/mex.js.map +1 -1
  42. package/lib/Socket/newsletter.d.ts +1 -0
  43. package/lib/Socket/newsletter.d.ts.map +1 -1
  44. package/lib/Socket/newsletter.js +22 -20
  45. package/lib/Socket/newsletter.js.map +1 -1
  46. package/lib/Socket/newsletterDirectory.d.ts +201 -0
  47. package/lib/Socket/newsletterDirectory.d.ts.map +1 -0
  48. package/lib/Socket/newsletterDirectory.js +296 -0
  49. package/lib/Socket/newsletterDirectory.js.map +1 -0
  50. package/lib/Types/Message.d.ts +32 -2
  51. package/lib/Types/Message.d.ts.map +1 -1
  52. package/lib/Utils/messages-media.d.ts +4 -0
  53. package/lib/Utils/messages-media.d.ts.map +1 -1
  54. package/lib/Utils/messages-media.js +14 -5
  55. package/lib/Utils/messages-media.js.map +1 -1
  56. package/lib/Utils/messages.d.ts +18 -1
  57. package/lib/Utils/messages.d.ts.map +1 -1
  58. package/lib/Utils/messages.js +168 -16
  59. package/lib/Utils/messages.js.map +1 -1
  60. package/lib/Utils/process-message.d.ts +18 -0
  61. package/lib/Utils/process-message.d.ts.map +1 -1
  62. package/lib/Utils/process-message.js +43 -1
  63. package/lib/Utils/process-message.js.map +1 -1
  64. package/lib/WABinary/jid-utils.d.ts +2 -0
  65. package/lib/WABinary/jid-utils.d.ts.map +1 -1
  66. package/lib/WABinary/jid-utils.js +5 -0
  67. package/lib/WABinary/jid-utils.js.map +1 -1
  68. package/package.json +1 -1
@@ -9,6 +9,22 @@ export type ChannelStatusDeps = {
9
9
  waUploadToServer: WAMediaUploadFunction;
10
10
  userJid?: string;
11
11
  };
12
+ /** Dependencies for channel status operations that query or acknowledge the server. */
13
+ export type ChannelStatusQueryDeps = {
14
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<BinaryNode>;
15
+ generateMessageTag: () => string;
16
+ };
17
+ /** Page options for fetching a channel's published statuses. */
18
+ export type ChannelStatusFetchOptions = {
19
+ count: number;
20
+ before?: string;
21
+ after?: string;
22
+ };
23
+ /** Parsed statuses plus the raw IQ response. */
24
+ export type ChannelStatusFetchResult = {
25
+ statuses: ChannelStatus[];
26
+ raw: BinaryNode;
27
+ };
12
28
  /** What sendChannelStatus returns: the stanza id and the message that went out. */
13
29
  export type ChannelStatusSent = {
14
30
  id: string;
@@ -50,4 +66,211 @@ export declare const decodeChannelStatus: (node: BinaryNode) => ChannelStatus |
50
66
  * backgroundColor for text statuses and font for text.
51
67
  */
52
68
  export declare const sendChannelStatus: (jid: string, content: AnyMessageContent, deps: ChannelStatusDeps, options?: ChannelStatusOptions) => Promise<ChannelStatusSent>;
69
+ /**
70
+ * React to a channel status, or remove the reaction with null.
71
+ * `serverId` is the status's server-assigned id (from the status echo
72
+ * after posting, or from newsletterFetchStatus).
73
+ *
74
+ * Same wire shape as reacting to a channel message — a `<message
75
+ * type="reaction">` stanza to the channel JID with the status's server
76
+ * id; the server routes by server_id within the newsletter. Removing a
77
+ * reaction sends edit='7' with an empty reaction, exactly like
78
+ * newsletterReactMessage does for messages.
79
+ */
80
+ export declare const reactChannelStatus: (jid: string, serverId: string, reaction: string | null, deps: ChannelStatusQueryDeps) => Promise<void>;
81
+ /**
82
+ * Revoke (delete) one of the channel's own statuses, by server id.
83
+ *
84
+ * Wire shape: a newsletter IQ with a `<revoke server_id>` child — the
85
+ * same IQ family as the status fetch (status_updates) and live_updates.
86
+ * This shape could not be confirmed from the decompiled app (stanza tag
87
+ * names are token-encoded there), so it needs a live check against a
88
+ * real channel before it is trusted.
89
+ */
90
+ export declare const revokeChannelStatus: (jid: string, statusId: string, deps: ChannelStatusQueryDeps) => Promise<BinaryNode>;
91
+ /**
92
+ * Fetch the channel's published statuses, paginated by server id.
93
+ * `before` fetches statuses older than that server id, `after` newer
94
+ * ones.
95
+ *
96
+ * Wire shape, from the app: an IQ to the channel with a `<status_updates>`
97
+ * child carrying count and the before/after cursors (the app also sends
98
+ * a `since` timestamp there; this API pages by server id instead).
99
+ * The result carries the statuses as `<status>` children of
100
+ * `<status_updates>`, in the same shape as the live `<status>` stanzas
101
+ * decodeChannelStatus reads. A fetched status node may not carry a
102
+ * `from` attr (the IQ is already addressed to the channel), so the
103
+ * channel JID is filled in for the decoder.
104
+ */
105
+ export declare const fetchChannelStatuses: (jid: string, options: ChannelStatusFetchOptions, deps: ChannelStatusQueryDeps) => Promise<ChannelStatusFetchResult>;
106
+ /**
107
+ * Fetch the answers people gave to a channel status question, or the
108
+ * responses to a channel status.
109
+ *
110
+ * Two jobs in the app do this, both building the same IQ and differing
111
+ * only in the `<question_responses>` child:
112
+ *
113
+ * - GetNewsletterQuestionResponsesJob (answers to a QUESTION status):
114
+ * `J9G $t=8` builds an IQ `xmlns="newsletter" type="get"` to the
115
+ * channel with a `<question_responses server_id="<question server id>"
116
+ * count="<count>">` child. Optional children, in order, are themselves
117
+ * `<question_responses>` nodes (that nesting is what the app sends):
118
+ * `<question_responses before="<beforeResponseServerId>"/>` for the
119
+ * next page (C1941J8e(str, 22)), `<question_responses><filters>
120
+ * <contacts|replied|starred/></filters></question_responses>` for a
121
+ * filter (C1946J8j: ordinal 0 = contacts, 1 = replied, 2 = starred),
122
+ * and `<question_responses><search text="<query>"/></question_responses>`
123
+ * for a text search (C1941J8e default case). The job hardcodes
124
+ * count = 30, rejects questionServerId < 0, and `server_id` is only
125
+ * written when 99 <= id <= 2147476647 (IHO.A0S); count is only written
126
+ * when 1 <= count <= 1000.
127
+ * - GetNewsletterStatusResponsesJob (responses to a STATUS):
128
+ * `J9G $t=10` is the same IQ but the child carries `type="status"`
129
+ * and has no search child (only before + filter). The job rejects
130
+ * questionStatusServerId outside 99 <= id < 2147476648 and count
131
+ * outside 1..300 (J9G.A02).
132
+ *
133
+ * The result (parsed by J9S for questions, J9T for statuses) is the IQ
134
+ * result with a `<question_responses server_id="..." [type="status"]>`
135
+ * child holding 0..N `<question_response>` children (J9T caps the list
136
+ * at 300). Each item (KG6.A0R + A0Q + A0C + A0H) is:
137
+ *
138
+ * <question_response>
139
+ * <sender lid="<responder LID>" notify_name="<name>">
140
+ * <picture direct_path="..."/>
141
+ * </sender>
142
+ * <message id="<stanza id>" t="<unix secs>" type="text" [is_sender="true"]>
143
+ * <plaintext>proto.Message bytes</plaintext>
144
+ * <meta questiontype="response" response_server_id="<answer server id>"/>
145
+ * </message>
146
+ * [<flags> replied / starred markers </flags>]
147
+ * [<reactions><reaction code="..."/></reactions>]
148
+ * </question_response>
149
+ *
150
+ * The `<message>` is the same shape as a status stanza: `<plaintext>`
151
+ * holds the plain proto.Message (a text answer is an
152
+ * extendedTextMessage). `response_server_id` is the answer's own server
153
+ * id — pass the last response's id as `before` for the next page.
154
+ * The `replied`/`starred` flag encoding inside `<flags>` could not be
155
+ * pinned down from the decompiled parser (child vs attr), so both are
156
+ * accepted; a live check should confirm which one the server sends.
157
+ */
158
+ /** Filter for fetching status responses (C1946J8j: 0 = contacts, 1 = replied, 2 = starred). */
159
+ export type ChannelStatusResponseFilter = 'contacts' | 'replied' | 'starred';
160
+ /**
161
+ * Which responses to fetch. 'question' fetches the answers to a question
162
+ * status (no `type` attr, search allowed); 'status' fetches responses to
163
+ * a status (`type="status"` on the child, no search).
164
+ */
165
+ export type ChannelStatusResponsesKind = 'question' | 'status';
166
+ /** Options for fetching channel status responses. */
167
+ export type ChannelStatusResponsesOptions = {
168
+ /** how many responses to fetch; defaults to 30, the app's hardcoded question count */
169
+ count?: number;
170
+ /** fetch responses older than this response server id (the `before` cursor) */
171
+ before?: string;
172
+ /** only responses from contacts / that were replied to / that were starred */
173
+ filter?: ChannelStatusResponseFilter;
174
+ /** free-text search over the answers; question kind only (the status job has no search) */
175
+ searchQuery?: string;
176
+ /** 'question' (default) or 'status' */
177
+ kind?: ChannelStatusResponsesKind;
178
+ };
179
+ /** One answer/response to a channel status, decoded from a `<question_response>` node. */
180
+ export type ChannelStatusResponse = {
181
+ /** stanza id of the answer message (`<message id>`) */
182
+ id: string;
183
+ /** the answer's own server id (`<meta response_server_id>`); the `before` cursor for the next page */
184
+ responseServerId?: string;
185
+ /** responder's LID (`<sender lid>`) */
186
+ senderLid?: string;
187
+ /** responder's display name (`<sender notify_name>`) */
188
+ senderNotifyName?: string;
189
+ /** responder's profile picture path (`<sender><picture direct_path>`) */
190
+ senderPictureDirectPath?: string;
191
+ /** unix timestamp (seconds) from the answer `<message t>` */
192
+ messageTimestamp: number;
193
+ /** true when the answer is our own (`<message is_sender="true">`) */
194
+ fromMe: boolean;
195
+ /** `<meta questiontype>`; the app requires this to be 'response' */
196
+ questionType?: string;
197
+ /** text of a text answer, from extendedTextMessage.text (or conversation) */
198
+ text?: string;
199
+ /** the full decoded proto.Message, for media / other answer kinds */
200
+ message?: proto.IMessage;
201
+ /** the answer was replied to (from the `<flags>` child) */
202
+ replied: boolean;
203
+ /** the answer was starred (from the `<flags>` child) */
204
+ starred: boolean;
205
+ /** reaction code on the answer, if any (`<reactions><reaction code>`) */
206
+ reaction?: string;
207
+ /** the raw `<question_response>` node */
208
+ raw: BinaryNode;
209
+ };
210
+ /** What fetchChannelStatusResponses returns: the parsed answers plus the raw IQ result. */
211
+ export type ChannelStatusResponsesResult = {
212
+ responses: ChannelStatusResponse[];
213
+ /** `server_id` of the `<question_responses>` envelope (the question/status asked about) */
214
+ serverId?: string;
215
+ /** `type` of the `<question_responses>` envelope ('status' for the status kind) */
216
+ type?: string;
217
+ raw: BinaryNode;
218
+ };
219
+ /** The app's hardcoded count for the question-responses job. */
220
+ export declare const CHANNEL_STATUS_QUESTION_RESPONSES_DEFAULT_COUNT = 30;
221
+ /** Max count the app writes for question responses (J9G $t=8: 1..1000). */
222
+ export declare const CHANNEL_STATUS_QUESTION_RESPONSES_MAX_COUNT = 1000;
223
+ /** Max count the app writes for status responses (J9G.A02: 1..300). */
224
+ export declare const CHANNEL_STATUS_RESPONSES_MAX_COUNT = 300;
225
+ /** `server_id` is only written on the wire inside this range (IHO.A0S). */
226
+ export declare const CHANNEL_STATUS_MIN_SERVER_ID = 99;
227
+ export declare const CHANNEL_STATUS_MAX_SERVER_ID = 2147476647;
228
+ /**
229
+ * Decode one `<question_response>` node (KG6.A0R + A0Q + A0C + A0H).
230
+ * Returns undefined when the item has no `<message>` child or its
231
+ * `<plaintext>` payload is not a decodable proto.Message — the app's
232
+ * parser requires both, so such an item is not a usable answer.
233
+ */
234
+ export declare const decodeChannelStatusResponse: (node: BinaryNode) => ChannelStatusResponse | undefined;
235
+ /**
236
+ * Fetch the answers to a channel status question (`kind: 'question'`,
237
+ * default), or the responses to a channel status (`kind: 'status'`).
238
+ * `serverId` is the server id of the question/status being asked about.
239
+ * Page with `before` set to the last response's `responseServerId`.
240
+ * The `searchQuery` option is only valid for the question kind — the
241
+ * status job in the app has no search parameter.
242
+ */
243
+ export declare const fetchChannelStatusResponses: (jid: string, serverId: string, options: ChannelStatusResponsesOptions, deps: ChannelStatusQueryDeps) => Promise<ChannelStatusResponsesResult>;
244
+ /**
245
+ * Send a view receipt for a channel status — the receipt the app sends
246
+ * when a channel status is viewed (SendNewsletterStatusViewReceiptJob).
247
+ *
248
+ * What the APK pins down:
249
+ * - The job is enqueued from StatusManager.markStatusAsSeenInternal when
250
+ * a newsletter status is marked seen, carrying `newsletterRawJid`
251
+ * (the channel JID), `receiptStanzaId` (the status message's stanza
252
+ * id — the `<status id>`, e.g. '3EB079CA1FB41899DF027B', NOT the
253
+ * server_id) and `sortId` (the message's local sort_id), and only
254
+ * when sortId > 0. Its job id is `status-view-receipt-<rawJid>`.
255
+ * - The receiving side (StatusMessageStateUpdateReceiptHandler /
256
+ * processNewsletterStatusViewReceipt, C1U8) expects a receipt stanza
257
+ * with type "view" (or "read-self"), `from` the viewer, `id` the
258
+ * status stanza id, and a `t` (unix seconds) attr, and looks the
259
+ * status up by (newsletter JID, stanza id). It never reads a sort id
260
+ * off the stanza.
261
+ *
262
+ * What the APK does NOT show: the job class defines no onRun in the dex
263
+ * (verified by parsing classes10.dex — only <init>, A00 and Ct8 exist),
264
+ * so the stanza the app actually sends could not be read from it. The
265
+ * shape sent here is the generic receipt the fork already builds in
266
+ * sendReceipt (`<receipt to id [type] [t]>`, fire-and-forget via
267
+ * sendNode) with type "view", which is exactly the shape the receiving
268
+ * handler expects. This needs a live check against a real channel
269
+ * before it is trusted.
270
+ *
271
+ * `sortId` is accepted because the app's job carries it and only fires
272
+ * when it is positive; it is validated the same way but is NOT placed
273
+ * on the wire, because no APK evidence puts it there.
274
+ */
275
+ export declare const sendChannelStatusViewReceipt: (jid: string, receiptStanzaId: string, sortId: number, deps: Pick<ChannelStatusDeps, "sendNode">) => Promise<void>;
53
276
  //# sourceMappingURL=channelStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"channelStatus.d.ts","sourceRoot":"","sources":["../../src/Socket/channelStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAGxF,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,sBAAsB,CAAA;AAE1E,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,EAAE,iBAAiB,GAAG,MAAM,CAAC,CAAA;AAE3F,MAAM,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAChD,gBAAgB,EAAE,qBAAqB,CAAA;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,EAAE,E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yCAAyC;IACzC,GAAG,EAAE,UAAU,CAAA;CACf,CAAA;AAED,2FAA2F;AAC3F,MAAM,MAAM,4BAA4B,GAAG;IAC1C,SAAS,EAAE,qBAAqB,EAAE,CAAA;IAClC,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,UAAU,CAAA;CACf,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,+CAA+C,KAAK,CAAA;AACjE,2EAA2E;AAC3E,eAAO,MAAM,2CAA2C,OAAO,CAAA;AAC/D,uEAAuE;AACvE,eAAO,MAAM,kCAAkC,MAAM,CAAA;AACrD,2EAA2E;AAC3E,eAAO,MAAM,4BAA4B,KAAK,CAAA;AAC9C,eAAO,MAAM,4BAA4B,aAAa,CAAA;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,UAAU,KAAG,qBAAqB,GAAG,SA0DtF,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,GACvC,KAAK,MAAM,EACX,UAAU,MAAM,EAChB,SAAS,6BAA6B,EACtC,MAAM,sBAAsB,KAC1B,OAAO,CAAC,4BAA4B,CAkHtC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,4BAA4B,GACxC,KAAK,MAAM,EACX,iBAAiB,MAAM,EACvB,QAAQ,MAAM,EACd,MAAM,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,KACvC,OAAO,CAAC,IAAI,CAkBd,CAAA"}
@@ -1,7 +1,8 @@
1
+ import { Boom } from '@hapi/boom';
1
2
  import { proto } from '../../WAProto/index.js';
2
3
  import { generateMessageIDV2 } from '../Utils/generics.js';
3
4
  import { generateWAMessageContent } from '../Utils/index.js';
4
- import { getBinaryNodeChild } from '../WABinary/index.js';
5
+ import { getBinaryNodeChild, getBinaryNodeChildren } from '../WABinary/index.js';
5
6
  /**
6
7
  * Decode a channel status from its incoming `<status>` stanza.
7
8
  *
@@ -87,4 +88,314 @@ export const sendChannelStatus = async (jid, content, deps, options = {}) => {
87
88
  });
88
89
  return { id, channelJid: jid, message: inner };
89
90
  };
91
+ /**
92
+ * React to a channel status, or remove the reaction with null.
93
+ * `serverId` is the status's server-assigned id (from the status echo
94
+ * after posting, or from newsletterFetchStatus).
95
+ *
96
+ * Same wire shape as reacting to a channel message — a `<message
97
+ * type="reaction">` stanza to the channel JID with the status's server
98
+ * id; the server routes by server_id within the newsletter. Removing a
99
+ * reaction sends edit='7' with an empty reaction, exactly like
100
+ * newsletterReactMessage does for messages.
101
+ */
102
+ export const reactChannelStatus = async (jid, serverId, reaction, deps) => {
103
+ await deps.query({
104
+ tag: 'message',
105
+ attrs: {
106
+ to: jid,
107
+ ...(reaction ? {} : { edit: '7' }),
108
+ type: 'reaction',
109
+ server_id: serverId,
110
+ id: deps.generateMessageTag()
111
+ },
112
+ content: [
113
+ {
114
+ tag: 'reaction',
115
+ attrs: reaction ? { code: reaction } : {}
116
+ }
117
+ ]
118
+ });
119
+ };
120
+ /**
121
+ * Revoke (delete) one of the channel's own statuses, by server id.
122
+ *
123
+ * Wire shape: a newsletter IQ with a `<revoke server_id>` child — the
124
+ * same IQ family as the status fetch (status_updates) and live_updates.
125
+ * This shape could not be confirmed from the decompiled app (stanza tag
126
+ * names are token-encoded there), so it needs a live check against a
127
+ * real channel before it is trusted.
128
+ */
129
+ export const revokeChannelStatus = async (jid, statusId, deps) => {
130
+ return deps.query({
131
+ tag: 'iq',
132
+ attrs: {
133
+ id: deps.generateMessageTag(),
134
+ type: 'set',
135
+ xmlns: 'newsletter',
136
+ to: jid
137
+ },
138
+ content: [{ tag: 'revoke', attrs: { server_id: statusId } }]
139
+ });
140
+ };
141
+ /**
142
+ * Fetch the channel's published statuses, paginated by server id.
143
+ * `before` fetches statuses older than that server id, `after` newer
144
+ * ones.
145
+ *
146
+ * Wire shape, from the app: an IQ to the channel with a `<status_updates>`
147
+ * child carrying count and the before/after cursors (the app also sends
148
+ * a `since` timestamp there; this API pages by server id instead).
149
+ * The result carries the statuses as `<status>` children of
150
+ * `<status_updates>`, in the same shape as the live `<status>` stanzas
151
+ * decodeChannelStatus reads. A fetched status node may not carry a
152
+ * `from` attr (the IQ is already addressed to the channel), so the
153
+ * channel JID is filled in for the decoder.
154
+ */
155
+ export const fetchChannelStatuses = async (jid, options, deps) => {
156
+ const attrs = { count: options.count.toString() };
157
+ if (options.before) {
158
+ attrs.before = options.before;
159
+ }
160
+ if (options.after) {
161
+ attrs.after = options.after;
162
+ }
163
+ const raw = await deps.query({
164
+ tag: 'iq',
165
+ attrs: {
166
+ id: deps.generateMessageTag(),
167
+ type: 'get',
168
+ xmlns: 'newsletter',
169
+ to: jid
170
+ },
171
+ content: [{ tag: 'status_updates', attrs }]
172
+ });
173
+ const updatesNode = getBinaryNodeChild(raw, 'status_updates') ?? raw;
174
+ const statuses = getBinaryNodeChildren(updatesNode, 'status')
175
+ .map(node => decodeChannelStatus({
176
+ ...node,
177
+ attrs: { ...node.attrs, from: node.attrs.from || jid }
178
+ }))
179
+ .filter((status) => !!status);
180
+ return { statuses, raw };
181
+ };
182
+ /** The app's hardcoded count for the question-responses job. */
183
+ export const CHANNEL_STATUS_QUESTION_RESPONSES_DEFAULT_COUNT = 30;
184
+ /** Max count the app writes for question responses (J9G $t=8: 1..1000). */
185
+ export const CHANNEL_STATUS_QUESTION_RESPONSES_MAX_COUNT = 1000;
186
+ /** Max count the app writes for status responses (J9G.A02: 1..300). */
187
+ export const CHANNEL_STATUS_RESPONSES_MAX_COUNT = 300;
188
+ /** `server_id` is only written on the wire inside this range (IHO.A0S). */
189
+ export const CHANNEL_STATUS_MIN_SERVER_ID = 99;
190
+ export const CHANNEL_STATUS_MAX_SERVER_ID = 2147476647;
191
+ /**
192
+ * Decode one `<question_response>` node (KG6.A0R + A0Q + A0C + A0H).
193
+ * Returns undefined when the item has no `<message>` child or its
194
+ * `<plaintext>` payload is not a decodable proto.Message — the app's
195
+ * parser requires both, so such an item is not a usable answer.
196
+ */
197
+ export const decodeChannelStatusResponse = (node) => {
198
+ const messageNode = getBinaryNodeChild(node, 'message');
199
+ if (!messageNode) {
200
+ return undefined;
201
+ }
202
+ let message;
203
+ let text;
204
+ const plaintextNode = getBinaryNodeChild(messageNode, 'plaintext');
205
+ if (plaintextNode?.content) {
206
+ const contentBuf = typeof plaintextNode.content === 'string'
207
+ ? Buffer.from(plaintextNode.content, 'binary')
208
+ : Buffer.from(plaintextNode.content);
209
+ try {
210
+ message = proto.Message.decode(contentBuf);
211
+ }
212
+ catch {
213
+ return undefined;
214
+ }
215
+ const extendedText = message.extendedTextMessage;
216
+ text = extendedText?.text || message.conversation || undefined;
217
+ }
218
+ const senderNode = getBinaryNodeChild(node, 'sender');
219
+ const metaNode = getBinaryNodeChild(messageNode, 'meta');
220
+ const flagsNode = getBinaryNodeChild(node, 'flags');
221
+ const hasFlag = (name) => {
222
+ if (!flagsNode) {
223
+ return false;
224
+ }
225
+ // the decompiled parser checks for a `replied`/`starred` marker
226
+ // inside <flags> without saying whether it is a child or an
227
+ // attr, so both shapes are accepted
228
+ return !!getBinaryNodeChild(flagsNode, name) || flagsNode.attrs[name] !== undefined;
229
+ };
230
+ const reactionsNode = getBinaryNodeChild(node, 'reactions');
231
+ const reactionNode = reactionsNode ? getBinaryNodeChild(reactionsNode, 'reaction') : undefined;
232
+ const pictureNode = senderNode ? getBinaryNodeChild(senderNode, 'picture') : undefined;
233
+ return {
234
+ id: messageNode.attrs.id || '',
235
+ responseServerId: metaNode?.attrs.response_server_id,
236
+ senderLid: senderNode?.attrs.lid,
237
+ senderNotifyName: senderNode?.attrs.notify_name,
238
+ senderPictureDirectPath: pictureNode?.attrs.direct_path,
239
+ messageTimestamp: +(messageNode.attrs.t || 0),
240
+ fromMe: messageNode.attrs.is_sender === 'true',
241
+ questionType: metaNode?.attrs.questiontype,
242
+ text,
243
+ message,
244
+ replied: hasFlag('replied'),
245
+ starred: hasFlag('starred'),
246
+ reaction: reactionNode?.attrs.code,
247
+ raw: node
248
+ };
249
+ };
250
+ /**
251
+ * Fetch the answers to a channel status question (`kind: 'question'`,
252
+ * default), or the responses to a channel status (`kind: 'status'`).
253
+ * `serverId` is the server id of the question/status being asked about.
254
+ * Page with `before` set to the last response's `responseServerId`.
255
+ * The `searchQuery` option is only valid for the question kind — the
256
+ * status job in the app has no search parameter.
257
+ */
258
+ export const fetchChannelStatusResponses = async (jid, serverId, options, deps) => {
259
+ const kind = options.kind ?? 'question';
260
+ const count = options.count ?? CHANNEL_STATUS_QUESTION_RESPONSES_DEFAULT_COUNT;
261
+ const serverIdNum = Number(serverId);
262
+ if (!Number.isInteger(serverIdNum)) {
263
+ throw new Boom('serverId must be an integer server id', { statusCode: 400 });
264
+ }
265
+ if (kind === 'question') {
266
+ if (serverIdNum < 0) {
267
+ throw new Boom('serverId must not be negative', { statusCode: 400 });
268
+ }
269
+ if (count < 1 || count > CHANNEL_STATUS_QUESTION_RESPONSES_MAX_COUNT) {
270
+ throw new Boom(`count must be between 1 and ${CHANNEL_STATUS_QUESTION_RESPONSES_MAX_COUNT} for question responses`, { statusCode: 400 });
271
+ }
272
+ }
273
+ else {
274
+ if (serverIdNum < CHANNEL_STATUS_MIN_SERVER_ID || serverIdNum >= CHANNEL_STATUS_MAX_SERVER_ID + 1) {
275
+ throw new Boom(`serverId must be between ${CHANNEL_STATUS_MIN_SERVER_ID} and ${CHANNEL_STATUS_MAX_SERVER_ID} for status responses`, { statusCode: 400 });
276
+ }
277
+ if (count < 1 || count > CHANNEL_STATUS_RESPONSES_MAX_COUNT) {
278
+ throw new Boom(`count must be between 1 and ${CHANNEL_STATUS_RESPONSES_MAX_COUNT} for status responses`, {
279
+ statusCode: 400
280
+ });
281
+ }
282
+ if (options.searchQuery !== undefined) {
283
+ throw new Boom('searchQuery is only supported for question responses', { statusCode: 400 });
284
+ }
285
+ }
286
+ if (options.before?.length === 0) {
287
+ throw new Boom('before must not be empty', { statusCode: 400 });
288
+ }
289
+ if (options.searchQuery?.length === 0) {
290
+ throw new Boom('searchQuery must not be empty', { statusCode: 400 });
291
+ }
292
+ const responsesAttrs = { count: count.toString() };
293
+ if (kind === 'status') {
294
+ responsesAttrs.type = 'status';
295
+ }
296
+ // the app only writes server_id inside 99..2147476647 (IHO.A0S)
297
+ if (serverIdNum >= CHANNEL_STATUS_MIN_SERVER_ID && serverIdNum <= CHANNEL_STATUS_MAX_SERVER_ID) {
298
+ responsesAttrs.server_id = String(serverIdNum);
299
+ }
300
+ // the optional children are <question_responses> nodes nested inside
301
+ // the outer <question_responses> — that nesting is what the app
302
+ // sends (C1941J8e / C1946J8j), in before, filter, search order
303
+ const children = [];
304
+ if (options.before) {
305
+ children.push({ tag: 'question_responses', attrs: { before: options.before } });
306
+ }
307
+ if (options.filter) {
308
+ children.push({
309
+ tag: 'question_responses',
310
+ attrs: {},
311
+ content: [
312
+ {
313
+ tag: 'filters',
314
+ attrs: {},
315
+ content: [{ tag: options.filter, attrs: {} }]
316
+ }
317
+ ]
318
+ });
319
+ }
320
+ if (options.searchQuery) {
321
+ children.push({
322
+ tag: 'question_responses',
323
+ attrs: {},
324
+ content: [
325
+ {
326
+ tag: 'search',
327
+ attrs: { text: options.searchQuery }
328
+ }
329
+ ]
330
+ });
331
+ }
332
+ const raw = await deps.query({
333
+ tag: 'iq',
334
+ attrs: {
335
+ id: deps.generateMessageTag(),
336
+ type: 'get',
337
+ xmlns: 'newsletter',
338
+ to: jid
339
+ },
340
+ content: [{ tag: 'question_responses', attrs: responsesAttrs, content: children }]
341
+ });
342
+ const responsesNode = getBinaryNodeChild(raw, 'question_responses') ?? raw;
343
+ const responses = getBinaryNodeChildren(responsesNode, 'question_response')
344
+ .map(node => decodeChannelStatusResponse(node))
345
+ .filter((response) => !!response);
346
+ return {
347
+ responses,
348
+ serverId: responsesNode.attrs.server_id,
349
+ type: responsesNode.attrs.type,
350
+ raw
351
+ };
352
+ };
353
+ /**
354
+ * Send a view receipt for a channel status — the receipt the app sends
355
+ * when a channel status is viewed (SendNewsletterStatusViewReceiptJob).
356
+ *
357
+ * What the APK pins down:
358
+ * - The job is enqueued from StatusManager.markStatusAsSeenInternal when
359
+ * a newsletter status is marked seen, carrying `newsletterRawJid`
360
+ * (the channel JID), `receiptStanzaId` (the status message's stanza
361
+ * id — the `<status id>`, e.g. '3EB079CA1FB41899DF027B', NOT the
362
+ * server_id) and `sortId` (the message's local sort_id), and only
363
+ * when sortId > 0. Its job id is `status-view-receipt-<rawJid>`.
364
+ * - The receiving side (StatusMessageStateUpdateReceiptHandler /
365
+ * processNewsletterStatusViewReceipt, C1U8) expects a receipt stanza
366
+ * with type "view" (or "read-self"), `from` the viewer, `id` the
367
+ * status stanza id, and a `t` (unix seconds) attr, and looks the
368
+ * status up by (newsletter JID, stanza id). It never reads a sort id
369
+ * off the stanza.
370
+ *
371
+ * What the APK does NOT show: the job class defines no onRun in the dex
372
+ * (verified by parsing classes10.dex — only <init>, A00 and Ct8 exist),
373
+ * so the stanza the app actually sends could not be read from it. The
374
+ * shape sent here is the generic receipt the fork already builds in
375
+ * sendReceipt (`<receipt to id [type] [t]>`, fire-and-forget via
376
+ * sendNode) with type "view", which is exactly the shape the receiving
377
+ * handler expects. This needs a live check against a real channel
378
+ * before it is trusted.
379
+ *
380
+ * `sortId` is accepted because the app's job carries it and only fires
381
+ * when it is positive; it is validated the same way but is NOT placed
382
+ * on the wire, because no APK evidence puts it there.
383
+ */
384
+ export const sendChannelStatusViewReceipt = async (jid, receiptStanzaId, sortId, deps) => {
385
+ if (!receiptStanzaId) {
386
+ throw new Boom('receiptStanzaId is required to send a channel status view receipt', { statusCode: 400 });
387
+ }
388
+ if (!Number.isInteger(sortId) || sortId <= 0) {
389
+ throw new Boom('sortId must be a positive integer', { statusCode: 400 });
390
+ }
391
+ await deps.sendNode({
392
+ tag: 'receipt',
393
+ attrs: {
394
+ to: jid,
395
+ id: receiptStanzaId,
396
+ type: 'view',
397
+ t: Math.floor(Date.now() / 1000).toString()
398
+ }
399
+ });
400
+ };
90
401
  //# sourceMappingURL=channelStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"channelStatus.js","sourceRoot":"","sources":["../../src/Socket/channelStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAI9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAmB,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAiB1E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAgB,EAA6B,EAAE;IAClF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAA;IAC5B,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACpC,OAAO,SAAS,CAAA;IACjB,CAAC;IAED,MAAM,aAAa,GAAG,kBAAkB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;IAC3D,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,CAAC;QAC7B,OAAO,SAAS,CAAA;IACjB,CAAC;IAED,MAAM,UAAU,GACf,OAAO,aAAa,CAAC,OAAO,KAAK,QAAQ;QACxC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC9C,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,OAAqB,CAAC,CAAA;IAEpD,IAAI,OAAuB,CAAA;IAC3B,IAAI,CAAC;QACJ,qEAAqE;QACrE,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;IAC3C,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAA;IACjB,CAAC;IAED,M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Z,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,QAAQ,EAAE;SAC3C;KACD,CAAC,CAAA;AACH,CAAC,CAAA"}
@@ -63,6 +63,7 @@ export declare const makeChatsSocket: (config: SocketConfig) => {
63
63
  getBusinessProfile: (jid: string) => Promise<WABusinessProfile | void>;
64
64
  resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
65
65
  chatModify: (mod: ChatModification, jid: string) => Promise<void>;
66
+ pinChat: (jid: string, pin?: boolean) => Promise<void>;
66
67
  cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
67
68
  addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
68
69
  removeContact: (jid: string) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/Socket/chats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE9C,OAAO,KAAK,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAGhB,iBAAiB,EAEjB,YAAY,EAEZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,aAAa,EAEb,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAqBrD,OAAO,EACN,KAAK,UAAU,EAWf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAa,MAAM,YAAY,CAAA;AAGlD,eAAO,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BAjdnE,MAAM,EAAE;yCAaM,MAAM,EAAE;gCAepD,MAAM,WACF,aAAa,eACT;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;gCAmCN,MAAM;kCA0BJ,MAAM;8BAkBV,MAAM;6BAkBP,MAAM,UAAU,OAAO,GAAG,SAAS;2DAioBX,OAAO;+BAl1B7B,kBAAkB;mCAJd,sBAAsB;mCAQtB,cAAc;iCAIhB,oBAAoB;yCAIZ,cAAc;iCAItB,cAAc;uCAIR,mBAAmB;oCAItB,sBAAsB;8CAIZ,MAAM;8BAqPtB,MAAM,KAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;;sBAyjBxD,gBAAgB,OAAO,MAAM;mBA2dtC,MAAM;2BAl+Bc,cAAc,GAAG,QAAQ,kBAAkB,MAAM,GAAG,MAAM;4BA0iB/D,MAAM,WAAW,KAAK,CAAC,eAAe,CAAC,cAAc;yBAYxD,MAAM;;oBAYX,MAAM,UAAU,eAAe;wBAc3B,MAAM,WAAW,MAAM;2BAcpB,MAAM,WAAW,MAAM;2BAcvB,MAAM,aAAa,MAAM,WAAW,MAAM;8BAevC,MAAM,aAAa,MAAM,WAAW,MAAM;gBAhGxD,MAAM,YAAY;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,QAAQ,OAAO;sCA+G7C,gBAAgB;kCAYpB,MAAM;;;;;;0DAjmC5B,GAAG,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA27C/C,CAAA"}
@@ -1181,6 +1181,7 @@ export const makeChatsSocket = (config) => {
1181
1181
  getBusinessProfile,
1182
1182
  resyncAppState,
1183
1183
  chatModify,
1184
+ pinChat: (jid, pin = true) => chatModify({ pin }, jid),
1184
1185
  cleanDirtyBits,
1185
1186
  addOrEditContact,
1186
1187
  removeContact,