feat: customize link preview image width

This commit is contained in:
Adhiraj Singh
2022-04-19 19:12:24 +05:30
parent ab65a4dad9
commit f421f5d387
4 changed files with 19 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ import { BinaryNode, BinaryNodeAttributes, getBinaryNodeChild, getBinaryNodeChil
import { makeGroupsSocket } from './groups'
export const makeMessagesSocket = (config: SocketConfig) => {
const { logger } = config
const { logger, linkPreviewImageThumbnailWidth } = config
const sock = makeGroupsSocket(config)
const {
ev,
@@ -485,7 +485,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
logger,
userJid,
// multi-device does not have this yet
getUrlInfo: getUrlInfo,
getUrlInfo: text => getUrlInfo(text, { thumbnailWidth: linkPreviewImageThumbnailWidth }),
upload: waUploadToServer,
mediaCache: config.mediaCache,
...options,