mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
es lint fixes
This commit is contained in:
@@ -72,7 +72,7 @@ export class PosthogSpanProcessor implements SpanProcessor {
|
|||||||
try {
|
try {
|
||||||
return JSON.parse(data);
|
return JSON.parse(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.warn("Invalid prev call data", data);
|
logger.warn("Invalid prev call data", data, "error:", e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function updateRooms(): void {
|
function updateRooms(): void {
|
||||||
// We want to show all rooms that historically had a call and which we are (can become) part of.
|
// We want to show all rooms that historically had a call and which we are (or can become) part of.
|
||||||
const rooms = client
|
const rooms = client
|
||||||
.getRooms()
|
.getRooms()
|
||||||
.filter(roomHasCallMembershipEvents)
|
.filter(roomHasCallMembershipEvents)
|
||||||
@@ -142,7 +142,6 @@ export function useGroupCallRooms(client: MatrixClient): GroupCallRoom[] {
|
|||||||
const sortedRooms = sortRooms(client, rooms);
|
const sortedRooms = sortRooms(client, rooms);
|
||||||
const items = sortedRooms.map((room) => {
|
const items = sortedRooms.map((room) => {
|
||||||
const session = client.matrixRTC.getRoomSession(room);
|
const session = client.matrixRTC.getRoomSession(room);
|
||||||
session.memberships;
|
|
||||||
return {
|
return {
|
||||||
roomAlias: room.getCanonicalAlias() ?? undefined,
|
roomAlias: room.getCanonicalAlias() ?? undefined,
|
||||||
roomName: room.name,
|
roomName: room.name,
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ async function doConnect(
|
|||||||
await connectAndPublish(livekitRoom, sfuConfig, preCreatedAudioTrack, []);
|
await connectAndPublish(livekitRoom, sfuConfig, preCreatedAudioTrack, []);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
preCreatedAudioTrack?.stop();
|
preCreatedAudioTrack?.stop();
|
||||||
|
logger.warn("Stopped precreated audio tracks.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export abstract class OTelCallAbstractMediaStreamSpan {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract update(data: Object): void;
|
public abstract update(data: object): void;
|
||||||
|
|
||||||
public end(): void {
|
public end(): void {
|
||||||
this.trackSpans.forEach((tSpan) => {
|
this.trackSpans.forEach((tSpan) => {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export class ObjectFlattener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static flattenObjectRecursive(
|
public static flattenObjectRecursive(
|
||||||
obj: Object,
|
obj: object,
|
||||||
flatObject: Attributes,
|
flatObject: Attributes,
|
||||||
prefix: string,
|
prefix: string,
|
||||||
depth: number,
|
depth: number,
|
||||||
|
|||||||
@@ -505,7 +505,9 @@ function tryInitStorage(): Promise<void> {
|
|||||||
let indexedDB;
|
let indexedDB;
|
||||||
try {
|
try {
|
||||||
indexedDB = window.indexedDB;
|
indexedDB = window.indexedDB;
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
logger.warn("Could not get indexDB from window.", e);
|
||||||
|
}
|
||||||
|
|
||||||
if (indexedDB) {
|
if (indexedDB) {
|
||||||
global.mx_rage_store = new IndexedDBLogStore(
|
global.mx_rage_store = new IndexedDBLogStore(
|
||||||
|
|||||||
@@ -30,7 +30,10 @@ export class Setting<T> {
|
|||||||
try {
|
try {
|
||||||
initialValue = JSON.parse(storedValue);
|
initialValue = JSON.parse(storedValue);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.warn(`Invalid value stored for setting ${key}: ${storedValue}`);
|
logger.warn(
|
||||||
|
`Invalid value stored for setting ${key}: ${storedValue}.`,
|
||||||
|
e,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,9 @@ export function useSubmitRageshake(): {
|
|||||||
try {
|
try {
|
||||||
// MDN claims broad support across browsers
|
// MDN claims broad support across browsers
|
||||||
touchInput = String(window.matchMedia("(pointer: coarse)").matches);
|
touchInput = String(window.matchMedia("(pointer: coarse)").matches);
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
logger.warn("Could not get coarse pointer for rageshake submit.", e);
|
||||||
|
}
|
||||||
|
|
||||||
let description = opts.rageshakeRequestId
|
let description = opts.rageshakeRequestId
|
||||||
? `Rageshake ${opts.rageshakeRequestId}`
|
? `Rageshake ${opts.rageshakeRequestId}`
|
||||||
@@ -216,7 +218,9 @@ export function useSubmitRageshake(): {
|
|||||||
"storageManager_persisted",
|
"storageManager_persisted",
|
||||||
String(await navigator.storage.persisted()),
|
String(await navigator.storage.persisted()),
|
||||||
);
|
);
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
logger.warn("coulr not get navigator peristed storage", e);
|
||||||
|
}
|
||||||
} else if (document.hasStorageAccess) {
|
} else if (document.hasStorageAccess) {
|
||||||
// Safari
|
// Safari
|
||||||
try {
|
try {
|
||||||
@@ -224,7 +228,9 @@ export function useSubmitRageshake(): {
|
|||||||
"storageManager_persisted",
|
"storageManager_persisted",
|
||||||
String(await document.hasStorageAccess()),
|
String(await document.hasStorageAccess()),
|
||||||
);
|
);
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
logger.warn("could not get storage access", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (navigator.storage && navigator.storage.estimate) {
|
if (navigator.storage && navigator.storage.estimate) {
|
||||||
@@ -244,7 +250,9 @@ export function useSubmitRageshake(): {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
logger.warn("could not obatain storage estimate", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts.sendLogs) {
|
if (opts.sendLogs) {
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ export async function initClient(
|
|||||||
let indexedDB: IDBFactory | undefined;
|
let indexedDB: IDBFactory | undefined;
|
||||||
try {
|
try {
|
||||||
indexedDB = window.indexedDB;
|
indexedDB = window.indexedDB;
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
logger.warn("Could not get indexDB from window.", e);
|
||||||
|
}
|
||||||
|
|
||||||
// options we always pass to the client (stuff that we need in order to work)
|
// options we always pass to the client (stuff that we need in order to work)
|
||||||
const baseOpts = {
|
const baseOpts = {
|
||||||
|
|||||||
Reference in New Issue
Block a user