Skip to content

Commit

Permalink
Add Element video room type (#2273)
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown authored Apr 4, 2022
1 parent 71b7521 commit b832129
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/@types/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export const RoomCreateTypeField = "type";
export enum RoomType {
Space = "m.space",
UnstableCall = "org.matrix.msc3417.call",
ElementVideo = "io.element.video",
}

/**
Expand Down
8 changes: 8 additions & 0 deletions src/models/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2592,6 +2592,14 @@ export class Room extends TypedEventEmitter<EmittedEvents, RoomEventHandlerMap>
return this.getType() === RoomType.UnstableCall;
}

/**
* Returns whether the room is a video room.
* @returns {boolean} true if the room's type is RoomType.ElementVideo
*/
public isElementVideoRoom(): boolean {
return this.getType() === RoomType.ElementVideo;
}

/**
* This is an internal method. Calculates the name of the room from the current
* room state.
Expand Down

0 comments on commit b832129

Please sign in to comment.