plogme 2.0.9 → 2.1.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.
|
@@ -48,7 +48,7 @@ export const tokenizeCode = (code, language = 'javascript') => {
|
|
|
48
48
|
const firstImageValue = (...values) => values.find(value => value !== undefined && value !== null && String(value).length > 0);
|
|
49
49
|
|
|
50
50
|
/** Normalize album image variants without downgrading full-size URLs to previews. */
|
|
51
|
-
const buildRichImagePrimitive = (image = {}, expiration = String(Date.now() + 30 * 24 * 60 * 60 * 1000)
|
|
51
|
+
const buildRichImagePrimitive = (image = {}, expiration = String(Date.now() + 30 * 24 * 60 * 60 * 1000)) => {
|
|
52
52
|
const previewUrl = firstImageValue(image.imagePreviewUrl, image.previewUrl, image.preview_url, image.sourceUrl, image.source_url, image.url) || '';
|
|
53
53
|
const fullUrl = firstImageValue(image.imageHighResUrl, image.highResUrl, image.high_res_url, image.fullUrl, image.full_url, image.sourceUrl, image.source_url, image.url, previewUrl);
|
|
54
54
|
const darkPreviewUrl = firstImageValue(image.darkModePreviewUrl, image.dark_mode_preview_url, previewUrl);
|
|
@@ -79,11 +79,11 @@ const buildRichImagePrimitive = (image = {}, expiration = String(Date.now() + 30
|
|
|
79
79
|
asset_query_status: 'FETCHED',
|
|
80
80
|
__typename: 'GenAIImagePrimitive'
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
// WhatsApp requires the preview slots to recognize an image primitive.
|
|
83
|
+
// Omitting them makes mixed image/video albums silently drop the image.
|
|
84
|
+
primitive.preview_image = media(previewUrl, width, height);
|
|
85
|
+
primitive.dark_mode_preview_image = media(darkPreviewUrl, darkWidth, darkHeight);
|
|
86
|
+
primitive.dark_mode_full_image = media(darkFullUrl, darkWidth, darkHeight);
|
|
87
87
|
return primitive;
|
|
88
88
|
};
|
|
89
89
|
// Lia@Changes 09-04-26 --- Inject buffer into unifiedResponse.data to support proper rendering of rich messages (ex: tables and code blocks)
|
|
@@ -1009,7 +1009,7 @@ export const prepareVerticalAlbumMessage = ({ items = [], verificationMetadata }
|
|
|
1009
1009
|
fullUrl,
|
|
1010
1010
|
...(fullWidth > 0 ? { width: fullWidth, fullWidth } : {}),
|
|
1011
1011
|
...(fullHeight > 0 ? { height: fullHeight, fullHeight } : {})
|
|
1012
|
-
}, expiration
|
|
1012
|
+
}, expiration);
|
|
1013
1013
|
return { ...primitive, display_mode: 'FULL_WIDTH', full_width: true };
|
|
1014
1014
|
});
|
|
1015
1015
|
const richResponseMessage = proto.AIRichResponseMessage.create({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plogme",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Production-ready Baileys fork ⚉ with AI groups, Meta AI prompting, safe compositing fallbacks, rich responses, interactive messages, albums, newsletters, and communities — without antiban wrappers.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|