aunubaileys 1.0.51 β 1.0.52
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.52 / Baru di 1.0.52 β EXPERIMENTAL
|
|
68
|
+
|
|
69
|
+
- π **`aunuCard` gains like/dislike buttons.** The new `likeDislike: true` option appends two quick-reply buttons under the card β **π Suka** (id `aunu_like`) and **π Tidak Suka** (id `aunu_dislike`) β after any custom buttons. The ids are overridable via `likeId`/`dislikeId`; taps return to the bot as button replies carrying those ids, so votes can be counted. Without the option, card behaviour is exactly as in 1.0.50.
|
|
70
|
+
|
|
67
71
|
### π©Ή What's new in 1.0.51 / Baru di 1.0.51
|
|
68
72
|
|
|
69
73
|
- π **Three audited gaps, closed.** (1) **Key-store commit failures are no longer swallowed** (`auth-utils.js`): transaction commits still retry as before, but when every retry fails the error is now **thrown** β previously the mutations were silently discarded while the in-memory ratchet had already advanced, so every later message failed against the stale on-disk record. (2) **Hosted device :99 guard** (`signal.js`): `extractDeviceJids` now skips device 99 β hosted / Cloud-API companion devices are not E2E targets and libsignal rejects them when the device list is built. (3) **PN β LID session migration** (`libsignal.js`, `Socket/index.js`): the new repository method `migrateSession(fromJid, toJid)` moves the raw session record onto the LID address when the target has none (never overwrites). It fires automatically and best-effort when live traffic teaches a new PNβLID pair, and for the account's own session when the connection opens with both `me.id` and `me.lid` known. The 1.0.14β1.0.48 decrypt heals remain the safety net.
|
|
@@ -61,6 +61,10 @@ export interface AunuCardOptions {
|
|
|
61
61
|
/** Prebuilt imageMessage object, used as-is when provided. */
|
|
62
62
|
imageMessage?: Record<string, unknown>;
|
|
63
63
|
buttons?: AunuCardButton[];
|
|
64
|
+
/** Append π Suka / π Tidak Suka quick-reply buttons under the card. Taps return as button replies with the like/dislike ids. */
|
|
65
|
+
likeDislike?: boolean;
|
|
66
|
+
likeId?: string;
|
|
67
|
+
dislikeId?: string;
|
|
64
68
|
messageOptions?: MiscMessageGenerationOptions;
|
|
65
69
|
}
|
|
66
70
|
export interface AunuFakeQuoteOptions {
|
|
@@ -187,13 +187,18 @@ export const attachAunuExperimental = (sock) => {
|
|
|
187
187
|
const prepared = await prepareWAMessageMedia({ image: options.image }, { upload: sock.waUploadToServer });
|
|
188
188
|
imageMessage = prepared.imageMessage;
|
|
189
189
|
}
|
|
190
|
+
const cardButtons = (options.buttons || []).map(mapCardButton).filter(Boolean);
|
|
191
|
+
if (options.likeDislike) {
|
|
192
|
+
cardButtons.push({ name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'π Suka', id: options.likeId || 'aunu_like' }) });
|
|
193
|
+
cardButtons.push({ name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'π Tidak Suka', id: options.dislikeId || 'aunu_dislike' }) });
|
|
194
|
+
}
|
|
190
195
|
const interactive = {
|
|
191
196
|
header: (options.title || options.subtitle || imageMessage)
|
|
192
197
|
? { title: options.title || '', subtitle: options.subtitle, hasMediaAttachment: !!imageMessage, imageMessage }
|
|
193
198
|
: undefined,
|
|
194
199
|
body: { text: options.text || '' },
|
|
195
200
|
footer: options.footer ? { text: options.footer } : undefined,
|
|
196
|
-
buttons:
|
|
201
|
+
buttons: cardButtons
|
|
197
202
|
};
|
|
198
203
|
return sock.sendMessage(jid, { interactive }, options.messageOptions || {});
|
|
199
204
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aunubaileys",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.52",
|
|
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",
|