isOnWhatsApp query fix

This commit is contained in:
Adhiraj Singh
2021-02-05 18:27:58 +05:30
parent d803c219b6
commit 9edef50f45

View File

@@ -34,7 +34,7 @@ export class WAConnection extends Base {
let phone = str.split('@')[0]
const url = `https://wa.me/${phone}`
const response = await this.fetchRequest(url, 'GET', undefined, undefined, undefined, false)
const loc = response.headers['Location'] as string
const loc = response.headers.location as string
if (!loc) {
this.logger.warn({ url, status: response.statusCode }, 'did not get location from request')
return