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, {
|
||||
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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user