mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:21:23 +00:00
fix(media): strip MEDIA: prefix in loadWebMediaInternal (#13107)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 9d95e6af5a
Co-authored-by: mcaxtr <7562095+mcaxtr@users.noreply.github.com>
Co-authored-by: steipete <58493+steipete@users.noreply.github.com>
Reviewed-by: @steipete
This commit is contained in:
@@ -14,6 +14,10 @@ import {
|
||||
|
||||
export { resetBaileysMocks, resetLoadConfigMock, setLoadConfigMock } from "./test-helpers.js";
|
||||
|
||||
// Avoid exporting inferred vitest mock types (TS2742 under pnpm + d.ts emit).
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
type AnyExport = any;
|
||||
|
||||
export const TEST_NET_IP = "203.0.113.10";
|
||||
|
||||
vi.mock("../agents/pi-embedded.js", () => ({
|
||||
@@ -119,7 +123,7 @@ export function installWebAutoReplyUnitTestHooks(opts?: { pinDns?: boolean }) {
|
||||
});
|
||||
}
|
||||
|
||||
export function createWebListenerFactoryCapture() {
|
||||
export function createWebListenerFactoryCapture(): AnyExport {
|
||||
let capturedOnMessage: ((msg: WebInboundMessage) => Promise<void>) | undefined;
|
||||
const listenerFactory = async (opts: {
|
||||
onMessage: (msg: WebInboundMessage) => Promise<void>;
|
||||
@@ -134,7 +138,7 @@ export function createWebListenerFactoryCapture() {
|
||||
};
|
||||
}
|
||||
|
||||
export function createWebInboundDeliverySpies() {
|
||||
export function createWebInboundDeliverySpies(): AnyExport {
|
||||
return {
|
||||
sendMedia: vi.fn(),
|
||||
reply: vi.fn().mockResolvedValue(undefined),
|
||||
|
||||
Reference in New Issue
Block a user