general: remove console logs, linting

This commit is contained in:
Rajeh Taher
2025-09-08 23:11:32 +03:00
parent d0f8713247
commit a2e7e070fc
4 changed files with 2 additions and 10 deletions
-3
View File
@@ -101,7 +101,6 @@ export const makeSocket = (config: SocketConfig) => {
ws.connect() ws.connect()
const sendPromise = promisify(ws.send) const sendPromise = promisify(ws.send)
/** send a raw buffer */ /** send a raw buffer */
const sendRawMessage = async (data: Uint8Array | Buffer) => { const sendRawMessage = async (data: Uint8Array | Buffer) => {
@@ -192,7 +191,6 @@ export const makeSocket = (config: SocketConfig) => {
.catch(reject) .catch(reject)
}) })
if (result && 'tag' in result) { if (result && 'tag' in result) {
assertNodeErrorFree(result) assertNodeErrorFree(result)
} }
@@ -412,7 +410,6 @@ export const makeSocket = (config: SocketConfig) => {
// Upload to server (outside transaction, can fail without affecting local keys) // Upload to server (outside transaction, can fail without affecting local keys)
try { try {
console.log("LOG", node)
await query(node) await query(node)
logger.info({ count }, 'uploaded pre-keys successfully') logger.info({ count }, 'uploaded pre-keys successfully')
lastUploadTime = Date.now() lastUploadTime = Date.now()
+1 -5
View File
@@ -258,11 +258,7 @@ export const fetchLatestBaileysVersion = async (options: AxiosRequestConfig<{}>
const versionMatch = versionLine!.match(/const version = \[(\d+),\s*(\d+),\s*(\d+)\]/) const versionMatch = versionLine!.match(/const version = \[(\d+),\s*(\d+),\s*(\d+)\]/)
if (versionMatch) { if (versionMatch) {
const version = [ const version = [parseInt(versionMatch[1]!), parseInt(versionMatch[2]!), parseInt(versionMatch[3]!)] as WAVersion
parseInt(versionMatch[1]!),
parseInt(versionMatch[2]!),
parseInt(versionMatch[3]!)
] as WAVersion
return { return {
version, version,
-1
View File
@@ -18,7 +18,6 @@ export const encodeWAM = (binaryInfo: BinaryInfo) => {
encodeWAMHeader(binaryInfo) encodeWAMHeader(binaryInfo)
encodeEvents(binaryInfo) encodeEvents(binaryInfo)
console.log(binaryInfo.buffer)
const totalSize = binaryInfo.buffer.map(a => a.length).reduce((a, b) => a + b) const totalSize = binaryInfo.buffer.map(a => a.length).reduce((a, b) => a + b)
const buffer = Buffer.alloc(totalSize) const buffer = Buffer.alloc(totalSize)
let offset = 0 let offset = 0