@ryuu-reinzz/haruka-lib 3.5.1 → 3.6.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/main/socket.js +18 -8
- package/package.json +1 -1
package/main/socket.js
CHANGED
|
@@ -262,6 +262,8 @@ export default function addProperty(socket, baileys) {
|
|
|
262
262
|
contextInfo = {},
|
|
263
263
|
bottom_sheet = false,
|
|
264
264
|
bottom_name = "",
|
|
265
|
+
limited_time_offer_text = "",
|
|
266
|
+
limited_time_offer = false,
|
|
265
267
|
mentionedJid = []
|
|
266
268
|
} = content;
|
|
267
269
|
|
|
@@ -453,17 +455,25 @@ export default function addProperty(socket, baileys) {
|
|
|
453
455
|
messageContent.nativeFlowMessage = {
|
|
454
456
|
buttons: processedButtons,
|
|
455
457
|
};
|
|
458
|
+
const params = {};
|
|
456
459
|
|
|
457
460
|
if (bottom_sheet) {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
461
|
+
params.bottom_sheet = {
|
|
462
|
+
in_thread_buttons_limit: 1,
|
|
463
|
+
divider_indices: [1, 2],
|
|
464
|
+
list_title: bottom_name,
|
|
465
|
+
button_title: bottom_name
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
if (limited_time_offer) {
|
|
469
|
+
params.limited_time_offer = {
|
|
470
|
+
text: limited_time_offer_text || "",
|
|
471
|
+
url: '',
|
|
472
|
+
copy_code: '',
|
|
473
|
+
expiration_time: Date.now() + (1000 * 60 * 60 * 24 * 7)
|
|
474
|
+
};
|
|
466
475
|
}
|
|
476
|
+
messageContent.nativeFlowMessage.messageParamsJson = JSON.stringify(params);
|
|
467
477
|
|
|
468
478
|
if (contextInfo.externalAdReply && typeof contextInfo.externalAdReply === "object") {
|
|
469
479
|
messageContent.contextInfo = {
|