mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Removed user agent for now
This commit is contained in:
@@ -271,10 +271,7 @@ export default class WhatsAppWebMessages extends WhatsAppWebGroups {
|
|||||||
const urlFetch = await fetch(hostname, {
|
const urlFetch = await fetch(hostname, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: body,
|
body: body,
|
||||||
headers: {
|
headers: { Origin: 'https://web.whatsapp.com' },
|
||||||
Origin: 'https://web.whatsapp.com',
|
|
||||||
'User-Agent': this.userAgentString
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
const responseJSON = await urlFetch.json()
|
const responseJSON = await urlFetch.json()
|
||||||
if (!responseJSON.url) {
|
if (!responseJSON.url) {
|
||||||
|
|||||||
@@ -126,10 +126,7 @@ export async function decodeMediaMessageBuffer(message: WAMessageContent, fetchH
|
|||||||
}
|
}
|
||||||
|
|
||||||
// download the message
|
// download the message
|
||||||
const headers = {
|
const headers = { Origin: 'https://web.whatsapp.com' }
|
||||||
Origin: 'https://web.whatsapp.com',
|
|
||||||
...fetchHeaders
|
|
||||||
}
|
|
||||||
const fetched = await fetch(messageContent.url, { headers })
|
const fetched = await fetch(messageContent.url, { headers })
|
||||||
const buffer = await fetched.buffer()
|
const buffer = await fetched.buffer()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user