Skip to content

Commit

Permalink
React more actively to changes in room membership
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed Sep 11, 2024
1 parent 1b5b934 commit ca135d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/state/CallViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import {
ParticipantEvent,
RemoteParticipant,
} from "livekit-client";
import { Room as MatrixRoom, RoomMember } from "matrix-js-sdk/src/matrix";
import {
Room as MatrixRoom,
RoomMember,
RoomStateEvent,
} from "matrix-js-sdk/src/matrix";

Check warning on line 23 in src/state/CallViewModel.ts

View check run for this annotation

Codecov / codecov/patch

src/state/CallViewModel.ts#L23

Added line #L23 was not covered by tests
import {
EMPTY,
Observable,
Expand Down Expand Up @@ -321,6 +325,8 @@ export class CallViewModel extends ViewModel {
this.remoteParticipants,
observeParticipantMedia(this.livekitRoom.localParticipant),
duplicateTiles.value,
// Also react to changes in the list of members
fromEvent(this.matrixRoom, RoomStateEvent.Update).pipe(startWith(null)),

Check warning on line 329 in src/state/CallViewModel.ts

View check run for this annotation

Codecov / codecov/patch

src/state/CallViewModel.ts#L329

Added line #L329 was not covered by tests
]).pipe(
scan(
(
Expand Down

0 comments on commit ca135d4

Please sign in to comment.