fix(master): yarn lock and axios error + move to WhiskeySockets libsignal

This commit is contained in:
Rajeh Taher
2024-06-16 17:11:17 +03:00
parent 4a21c81080
commit c8aab8d03f
3 changed files with 124 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
import { Boom } from '@hapi/boom'
import { AxiosRequestConfig } from 'axios'
import axios, { AxiosRequestConfig } from 'axios'
import { exec } from 'child_process'
import * as Crypto from 'crypto'
import { once } from 'events'
@@ -324,7 +324,6 @@ export async function generateThumbnail(
}
export const getHttpStream = async(url: string | URL, options: AxiosRequestConfig & { isStream?: true } = {}) => {
const { default: axios } = await import('axios')
const fetched = await axios.get(url.toString(), { ...options, responseType: 'stream' })
return fetched.data as Readable
}
@@ -602,7 +601,6 @@ export const getWAUploadToServer = (
refreshMediaConn: (force: boolean) => Promise<MediaConnInfo>,
): WAMediaUploadFunction => {
return async(stream, { mediaType, fileEncSha256B64, timeoutMs }) => {
const { default: axios } = await import('axios')
// send a query JSON to obtain the url & auth token to upload our media
let uploadInfo = await refreshMediaConn(false)