mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: update axios
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { AxiosRequestConfig } from 'axios'
|
||||
import { Logger } from 'pino'
|
||||
import { WAMediaUploadFunction, WAUrlInfo } from '../Types'
|
||||
import { prepareWAMessageMedia } from './messages'
|
||||
@@ -21,7 +22,7 @@ export type URLGenerationOptions = {
|
||||
/** Timeout in ms */
|
||||
timeout: number
|
||||
proxyUrl?: string
|
||||
headers?: { [key: string]: string }
|
||||
headers?: AxiosRequestConfig<{}>['headers']
|
||||
}
|
||||
uploadImage?: WAMediaUploadFunction
|
||||
logger?: Logger
|
||||
@@ -47,7 +48,10 @@ export const getUrlInfo = async(
|
||||
previewLink = 'https://' + previewLink
|
||||
}
|
||||
|
||||
const info = await getLinkPreview(previewLink, opts.fetchOpts)
|
||||
const info = await getLinkPreview(previewLink, {
|
||||
...opts.fetchOpts,
|
||||
headers: opts.fetchOpts as {}
|
||||
})
|
||||
if(info && 'title' in info && info.title) {
|
||||
const [image] = info.images
|
||||
|
||||
|
||||
Reference in New Issue
Block a user