feat: add url options to link preview gen

This commit is contained in:
Adhiraj Singh
2022-11-17 11:08:01 +05:30
parent 00d8cf4270
commit b33c753928
2 changed files with 24 additions and 9 deletions

View File

@@ -14,6 +14,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
logger,
linkPreviewImageThumbnailWidth,
generateHighQualityLinkPreview,
options: axiosOptions,
patchMessageBeforeSending,
} = config
const sock = makeGroupsSocket(config)
@@ -623,12 +624,15 @@ export const makeMessagesSocket = (config: SocketConfig) => {
text,
{
thumbnailWidth: linkPreviewImageThumbnailWidth,
timeoutMs: 3_000,
fetchOpts: {
timeout: 3_000,
...axiosOptions || { }
},
logger,
uploadImage: generateHighQualityLinkPreview
? waUploadToServer
: undefined
},
logger
),
upload: waUploadToServer,
mediaCache: config.mediaCache,