Skip to content

Commit

Permalink
Update src/stores/RoomViewStore.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Florian D <[email protected]>
  • Loading branch information
toger5 and florianduros authored Feb 11, 2025
1 parent 2135918 commit b7b8719
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/stores/RoomViewStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,8 @@ export class RoomViewStore extends EventEmitter {

// Start a call if requested
const currentRoomCall = this.state.roomId ? CallStore.instance.getCall(this.state.roomId) : null;
if (payload.view_call && room) {
if (!currentRoomCall) {
ElementCall.create(room, false);
}
if (payload.view_call && room && !currentRoomCall) {
ElementCall.create(room, false);
}
// Destroy the call when leaving call view
const prevRoomCall = this.state.roomId ? CallStore.instance.getCall(this.state.roomId) : null;
Expand Down

0 comments on commit b7b8719

Please sign in to comment.