feat: add timeoutMs to link preview

This commit is contained in:
Adhiraj Singh
2022-04-22 20:05:17 +05:30
parent a98484c38b
commit 68a6f34cde
2 changed files with 10 additions and 6 deletions

View File

@@ -485,7 +485,10 @@ export const makeMessagesSocket = (config: SocketConfig) => {
logger,
userJid,
// multi-device does not have this yet
getUrlInfo: text => getUrlInfo(text, { thumbnailWidth: linkPreviewImageThumbnailWidth }),
getUrlInfo: text => getUrlInfo(
text,
{ thumbnailWidth: linkPreviewImageThumbnailWidth, timeoutMs: 3_000 }
),
upload: waUploadToServer,
mediaCache: config.mediaCache,
...options,