mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: add profile picture timeout
This commit is contained in:
@@ -28,11 +28,12 @@ const makeChatsSocket = (config: LegacySocketConfig) => {
|
||||
})
|
||||
)
|
||||
|
||||
const profilePictureUrl = async(jid: string) => {
|
||||
const profilePictureUrl = async(jid: string, timeoutMs?: number) => {
|
||||
const response = await query({
|
||||
json: ['query', 'ProfilePicThumb', jid],
|
||||
expect200: false,
|
||||
requiresPhoneConnection: false
|
||||
requiresPhoneConnection: false,
|
||||
timeoutMs
|
||||
})
|
||||
return response.eurl as string | undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user