You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Improve is livekit checks to check for field
availability and first. Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -22,7 +22,10 @@ export interface LivekitTransportConfig extends Transport {
|
||||
}
|
||||
|
||||
export const isLivekitTransportConfig = (object: any): object is LivekitTransportConfig =>
|
||||
object.type === "livekit" && "livekit_service_url" in object;
|
||||
"type" in object &&
|
||||
object.type === "livekit" &&
|
||||
"livekit_service_url" in object &&
|
||||
typeof object.livekit_service_url === "string";
|
||||
|
||||
export interface LivekitTransport extends LivekitTransportConfig {
|
||||
livekit_alias: string;
|
||||
@@ -43,4 +46,7 @@ export interface LivekitFocusSelection extends Transport {
|
||||
* @deprecated see LivekitFocusSelection
|
||||
*/
|
||||
export const isLivekitFocusSelection = (object: any): object is LivekitFocusSelection =>
|
||||
object.type === "livekit" && "focus_selection" in object;
|
||||
"type" in object &&
|
||||
object.type === "livekit" &&
|
||||
"focus_selection" in object &&
|
||||
typeof object.focus_selection === "string";
|
||||
|
||||
Reference in New Issue
Block a user