From fabbdac1ca79d72d6464ab59654530ee225f542d Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Thu, 7 Nov 2024 10:12:31 +0000 Subject: [PATCH] lint --- src/room/ReactionAudioRenderer.test.tsx | 4 ++-- src/useReactions.tsx | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/room/ReactionAudioRenderer.test.tsx b/src/room/ReactionAudioRenderer.test.tsx index 0c545b3d..4645ba24 100644 --- a/src/room/ReactionAudioRenderer.test.tsx +++ b/src/room/ReactionAudioRenderer.test.tsx @@ -76,7 +76,7 @@ test("loads no audio elements when disabled in settings", () => { test("will play an audio sound when there is a reaction", () => { const audioIsPlaying: string[] = []; - window.HTMLMediaElement.prototype.play = function (): Promise { + window.HTMLMediaElement.prototype.play = async function (): Promise { audioIsPlaying.push((this.children[0] as HTMLSourceElement).src); return Promise.resolve(); }; @@ -101,7 +101,7 @@ test("will play an audio sound when there is a reaction", () => { test("will play multiple audio sounds when there are multiple different reactions", () => { const audioIsPlaying: string[] = []; - window.HTMLMediaElement.prototype.play = function (): Promise { + window.HTMLMediaElement.prototype.play = async function (): Promise { audioIsPlaying.push((this.children[0] as HTMLSourceElement).src); return Promise.resolve(); }; diff --git a/src/useReactions.tsx b/src/useReactions.tsx index a8d9b5d2..afe1e6c1 100644 --- a/src/useReactions.tsx +++ b/src/useReactions.tsx @@ -289,14 +289,7 @@ export const ReactionsProvider = ({ }, [room, addRaisedHand, removeRaisedHand, memberships, raisedHands]); const lowerHand = useCallback(async () => { - console.log("lower hand!"); if (!myUserId || !raisedHands[myUserId]) { - console.log( - "something is missing!", - myUserId, - clientState, - raisedHands[myUserId ?? ""], - ); return; } const myReactionId = raisedHands[myUserId].reactionEventId; @@ -310,7 +303,7 @@ export const ReactionsProvider = ({ } catch (ex) { logger.error("Failed to redact reaction event", myReactionId, ex); } - }, [myUserId, raisedHands, clientState, rtcSession]); + }, [myUserId, raisedHands, rtcSession, room]); return (