chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.

This commit is contained in:
cpojer
2026-01-31 16:03:28 +09:00
parent 481f696a87
commit 15792b153f
292 changed files with 643 additions and 699 deletions

View File

@@ -4,8 +4,8 @@ import { logVerbose } from "../../globals.js";
import type { createWaSocket } from "../session.js";
function unwrapMessage(message: proto.IMessage | undefined): proto.IMessage | undefined {
const normalized = normalizeMessageContent(message as proto.IMessage | undefined);
return normalized as proto.IMessage | undefined;
const normalized = normalizeMessageContent(message);
return normalized;
}
export async function downloadInboundMedia(
@@ -31,7 +31,7 @@ export async function downloadInboundMedia(
return undefined;
}
try {
const buffer = (await downloadMediaMessage(
const buffer = await downloadMediaMessage(
msg as WAMessage,
"buffer",
{},
@@ -39,7 +39,7 @@ export async function downloadInboundMedia(
reuploadRequest: sock.updateMediaMessage,
logger: sock.logger,
},
)) as Buffer;
);
return { buffer, mimetype };
} catch (err) {
logVerbose(`downloadMediaMessage failed: ${String(err)}`);