chore: update axios

This commit is contained in:
Adhiraj Singh
2023-02-18 12:34:04 +05:30
parent b2c1cfbf9c
commit f013b61e35
6 changed files with 816 additions and 792 deletions

View File

@@ -53,7 +53,10 @@ export const makeMessagesSocket = (config: SocketConfig) => {
const mediaConnNode = getBinaryNodeChild(result, 'media_conn')
const node: MediaConnInfo = {
hosts: getBinaryNodeChildren(mediaConnNode, 'host').map(
item => item.attrs as any
({ attrs }) => ({
hostname: attrs.hostname,
maxContentLengthBytes: +attrs.maxContentLengthBytes,
})
),
auth: mediaConnNode!.attrs.auth,
ttl: +mediaConnNode!.attrs.ttl,
@@ -319,7 +322,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
// only send to the specific device that asked for a retry
// otherwise the message is sent out to every device that should be a recipient
if(!isGroup) {
additionalAttributes = { ...additionalAttributes, device_fanout: 'false' }
additionalAttributes = { ...additionalAttributes, 'device_fanout': 'false' }
}
const { user, device } = jidDecode(participant.jid)!

View File

@@ -32,7 +32,7 @@ export const makeSocket = ({
}: SocketConfig) => {
const ws = new WebSocket(waWebSocketUrl, undefined, {
origin: DEFAULT_ORIGIN,
headers: options.headers,
headers: options.headers as {},
handshakeTimeout: connectTimeoutMs,
timeout: connectTimeoutMs,
agent