mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-12 18:39:19 +00:00
lint
This commit is contained in:
@@ -76,7 +76,7 @@ test("loads no audio elements when disabled in settings", () => {
|
|||||||
|
|
||||||
test("will play an audio sound when there is a reaction", () => {
|
test("will play an audio sound when there is a reaction", () => {
|
||||||
const audioIsPlaying: string[] = [];
|
const audioIsPlaying: string[] = [];
|
||||||
window.HTMLMediaElement.prototype.play = function (): Promise<void> {
|
window.HTMLMediaElement.prototype.play = async function (): Promise<void> {
|
||||||
audioIsPlaying.push((this.children[0] as HTMLSourceElement).src);
|
audioIsPlaying.push((this.children[0] as HTMLSourceElement).src);
|
||||||
return Promise.resolve();
|
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", () => {
|
test("will play multiple audio sounds when there are multiple different reactions", () => {
|
||||||
const audioIsPlaying: string[] = [];
|
const audioIsPlaying: string[] = [];
|
||||||
window.HTMLMediaElement.prototype.play = function (): Promise<void> {
|
window.HTMLMediaElement.prototype.play = async function (): Promise<void> {
|
||||||
audioIsPlaying.push((this.children[0] as HTMLSourceElement).src);
|
audioIsPlaying.push((this.children[0] as HTMLSourceElement).src);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -289,14 +289,7 @@ export const ReactionsProvider = ({
|
|||||||
}, [room, addRaisedHand, removeRaisedHand, memberships, raisedHands]);
|
}, [room, addRaisedHand, removeRaisedHand, memberships, raisedHands]);
|
||||||
|
|
||||||
const lowerHand = useCallback(async () => {
|
const lowerHand = useCallback(async () => {
|
||||||
console.log("lower hand!");
|
|
||||||
if (!myUserId || !raisedHands[myUserId]) {
|
if (!myUserId || !raisedHands[myUserId]) {
|
||||||
console.log(
|
|
||||||
"something is missing!",
|
|
||||||
myUserId,
|
|
||||||
clientState,
|
|
||||||
raisedHands[myUserId ?? ""],
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const myReactionId = raisedHands[myUserId].reactionEventId;
|
const myReactionId = raisedHands[myUserId].reactionEventId;
|
||||||
@@ -310,7 +303,7 @@ export const ReactionsProvider = ({
|
|||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
logger.error("Failed to redact reaction event", myReactionId, ex);
|
logger.error("Failed to redact reaction event", myReactionId, ex);
|
||||||
}
|
}
|
||||||
}, [myUserId, raisedHands, clientState, rtcSession]);
|
}, [myUserId, raisedHands, rtcSession, room]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ReactionsContext.Provider
|
<ReactionsContext.Provider
|
||||||
|
|||||||
Reference in New Issue
Block a user