1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Reduce video rooms log spam (#8913)

* Reduce video rooms log spam

If you forget to call preventDefault in widget action handlers,
matrix-widget-api logs a bunch of errors complaining that the action is
unsupported/unhandled, even if it isn't.

* Fix tests
This commit is contained in:
Robin
2022-06-29 10:09:41 -04:00
committed by GitHub
parent 2bbd542140
commit 3c14d93237
3 changed files with 15 additions and 5 deletions

View File

@@ -106,7 +106,7 @@ describe("VideoChannelStore", () => {
const waitForConnect = new Promise<void>(resolve =>
store.once(VideoChannelEvent.Connect, resolve),
);
join({ detail: {} } as unknown as CustomEvent<IWidgetApiRequest>);
join(new CustomEvent("widgetapirequest", { detail: {} }) as CustomEvent<IWidgetApiRequest>);
await waitForConnect;
};
@@ -119,7 +119,7 @@ describe("VideoChannelStore", () => {
const waitForHangup = new Promise<void>(resolve =>
store.once(VideoChannelEvent.Disconnect, resolve),
);
hangup({ detail: {} } as unknown as CustomEvent<IWidgetApiRequest>);
hangup(new CustomEvent("widgetapirequest", { detail: {} }) as CustomEvent<IWidgetApiRequest>);
await waitForHangup;
};