mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: generate high quality thumbs on link preview
This commit is contained in:
@@ -42,6 +42,7 @@ export interface WAUrlInfo {
|
||||
title: string
|
||||
description?: string
|
||||
jpegThumbnail?: Buffer
|
||||
highQualityThumbnail?: proto.Message.IImageMessage
|
||||
}
|
||||
|
||||
// types to generate WA messages
|
||||
@@ -192,6 +193,7 @@ export type WAMediaUploadFunction = (readStream: Readable, opts: { fileEncSha256
|
||||
|
||||
export type MediaGenerationOptions = {
|
||||
logger?: Logger
|
||||
mediaTypeOverride?: MediaType
|
||||
upload: WAMediaUploadFunction
|
||||
/** cache media so it does not have to be uploaded again */
|
||||
mediaCache?: NodeCache
|
||||
|
||||
@@ -38,6 +38,11 @@ export type SocketConfig = CommonSocketConfig & {
|
||||
syncFullHistory: boolean
|
||||
/** Should baileys fire init queries automatically, default true */
|
||||
fireInitQueries: boolean
|
||||
/**
|
||||
* generate a high quality link preview,
|
||||
* entails uploading the jpegThumbnail to WA
|
||||
* */
|
||||
generateHighQualityLinkPreview: boolean
|
||||
/**
|
||||
* fetch a message from your store
|
||||
* implement this so that messages failed to send (solves the "this message can take a while" issue) can be retried
|
||||
|
||||
Reference in New Issue
Block a user