zaileys 4.16.0 → 4.17.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.
- package/dist/builder/builder.d.ts +5 -0
- package/dist/builder/content/buttons.d.ts +2 -0
- package/dist/builder/content/html-app.d.ts +6 -0
- package/dist/index.cjs +16 -16
- package/dist/index.mjs +16 -16
- package/package.json +3 -1
|
@@ -78,4 +78,9 @@ export declare class MessageBuilder<State extends BuilderState> {
|
|
|
78
78
|
/** Relay skips baileys' contextInfo pass, so mentions and mentionAll are applied to the unwrapped node here. */
|
|
79
79
|
private applyRelayMentions;
|
|
80
80
|
private sendRelay;
|
|
81
|
+
/**
|
|
82
|
+
* Re-sends the card as an edit of itself, which renders it without WhatsApp's download prompt. The edit
|
|
83
|
+
* must sit inside `botForwardedMessage` like the original, or it lands as its own broken message.
|
|
84
|
+
*/
|
|
85
|
+
private relayIdenticalEdit;
|
|
81
86
|
}
|
|
@@ -4,6 +4,8 @@ export declare const RELAY_CONTENT_KEY = "__zaileysRelayMessage";
|
|
|
4
4
|
export declare const RELAY_MEDIA_KEY = "__zaileysHeaderMedia";
|
|
5
5
|
/** Marks relay content that may only target a group jid; the value is the method label used in the error. */
|
|
6
6
|
export declare const RELAY_REQUIRE_GROUP_KEY = "__zaileysRequireGroupJid";
|
|
7
|
+
/** Asks `sendRelay` to follow the message with an identical edit, which renders it without the download prompt. */
|
|
8
|
+
export declare const RELAY_BYPASS_DOWNLOAD_KEY = "__zaileysBypassDownload";
|
|
7
9
|
/** Carries a downloaded media buffer that `sendRelay` re-uploads and injects into the status envelope. */
|
|
8
10
|
export declare const RELAY_STATUS_MEDIA_KEY = "__zaileysStatusMedia";
|
|
9
11
|
export type StatusMedia = {
|
|
@@ -13,6 +13,12 @@ export interface HtmlAppOptions {
|
|
|
13
13
|
fallback?: string;
|
|
14
14
|
/** Byte ceiling for the UTF-8 markup. Default 256 KB. */
|
|
15
15
|
maxBytes?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Follow the card with an identical edit so it renders without WhatsApp's Download prompt. Costs one extra
|
|
18
|
+
* relay, and the card reloads whenever the recipient opens the keyboard. Default `true`; `false` for pages
|
|
19
|
+
* that keep state, such as games.
|
|
20
|
+
*/
|
|
21
|
+
bypassDownload?: boolean;
|
|
16
22
|
}
|
|
17
23
|
/** Builds an inline HTML card. WhatsApp renders it only on Android, with no network or storage access. */
|
|
18
24
|
export declare const buildHtmlAppContent: (markup: string | SafeHtml, opts?: HtmlAppOptions) => AnyMessageContent;
|