chore: add profile picture timeout

This commit is contained in:
Adhiraj Singh
2021-12-20 12:36:32 +05:30
parent c1301deda0
commit dbed7fef74
2 changed files with 5 additions and 4 deletions

View File

@@ -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
}