Removed user agent for now

This commit is contained in:
Adhiraj
2020-07-28 14:14:48 +05:30
parent 18cffdaa17
commit ed406439ce
2 changed files with 2 additions and 8 deletions

View File

@@ -271,10 +271,7 @@ export default class WhatsAppWebMessages extends WhatsAppWebGroups {
const urlFetch = await fetch(hostname, {
method: 'POST',
body: body,
headers: {
Origin: 'https://web.whatsapp.com',
'User-Agent': this.userAgentString
},
headers: { Origin: 'https://web.whatsapp.com' },
})
const responseJSON = await urlFetch.json()
if (!responseJSON.url) {

View File

@@ -126,10 +126,7 @@ export async function decodeMediaMessageBuffer(message: WAMessageContent, fetchH
}
// download the message
const headers = {
Origin: 'https://web.whatsapp.com',
...fetchHeaders
}
const headers = { Origin: 'https://web.whatsapp.com' }
const fetched = await fetch(messageContent.url, { headers })
const buffer = await fetched.buffer()