mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 13:54:30 +00:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -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)}`);
|
||||
|
||||
Reference in New Issue
Block a user