fix(NOWEB): sending preview in channels mention #2163
This commit is contained in:
1 parent
ac6d14394a
commit
255f84a12d
2 files changed
+11
-3
No files matched your search
@@ -1205,12 +1205,20 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
|
||||
urlInfo.jpegThumbnail = thumbnail.buffer;
|
||||
} else {
|
||||
// upload HQ thumbnail
|
||||
// newsletters need the thumbnail uploaded unencrypted (plaintext path),
|
||||
// otherwise clients can not render it (white/blurred preview image)
|
||||
const uploadToServer = this.sock.waUploadToServer;
|
||||
const uploadThumbnail = async (encFilePath, opts) => {
|
||||
opts.newsletter = isJidNewsletter(chatId);
|
||||
return await uploadToServer(encFilePath, opts);
|
||||
};
|
||||
const { imageMessage } = await esm.b.prepareWAMessageMedia(
|
||||
{ image: content },
|
||||
{
|
||||
upload: this.sock.waUploadToServer,
|
||||
upload: uploadThumbnail,
|
||||
mediaTypeOverride: 'thumbnail-link',
|
||||
options: { signal: AbortSignal.timeout(10_000) },
|
||||
jid: chatId,
|
||||
},
|
||||
);
|
||||
urlInfo.jpegThumbnail = imageMessage?.jpegThumbnail
|
||||
|
||||
@@ -7,7 +7,7 @@ __metadata:
|
||||
|
||||
"@adiwajshing/baileys@github:devlikeapro/Baileys#fork-master-2026-04-28":
|
||||
version: 7.0.0-rc13
|
||||
resolution: "@adiwajshing/baileys@https://github.com/devlikeapro/Baileys.git#commit=942ba050bab32436384e267ec2d8122ca434fba6"
|
||||
resolution: "@adiwajshing/baileys@https://github.com/devlikeapro/Baileys.git#commit=c4d8d4ed69edfd443132465d6c72bfaa70b6b0d6"
|
||||
dependencies:
|
||||
"@cacheable/node-cache": "npm:^1.4.0"
|
||||
"@hapi/boom": "npm:^9.1.3"
|
||||
@@ -32,7 +32,7 @@ __metadata:
|
||||
optional: true
|
||||
link-preview-js:
|
||||
optional: true
|
||||
checksum: 10/44194fa66bd9b6f3ca1cac9aa2e0edc88a5c2537b6bf366c70f9ebcb4560888785af8c5f4f2f18851d5fd9f55f7421a319a0157c0c6ed8d72734e3c9a0946c0c
|
||||
checksum: 10/4beee88b635785f2879bfac4d038a9d6cc531f1a309503e88cb142047b3345265bf1024df51b08dfa56f4ece5f53177e3033f6661281f528130dd0964a978821
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in new issue
Block a user