Skip to content

Commit

Permalink
fix: adjust to the recent changes made in #1451
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlaz committed Jul 30, 2024
1 parent 3f306b6 commit 9e47834
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions packages/client/src/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -774,16 +774,6 @@ export class Call {
this.logger('debug', 'Starting join flow');
this.state.setCallingState(CallingState.JOINING);

// TODO move to `doJoinRequest`
if (data?.ring && !this.ringing) {
this.ringingSubject.next(true);
}

if (this.ringing && !this.isCreatedByMe) {
// signals other users that I have accepted the incoming call.
await this.accept();
}

const performingMigrateReconnect =
this.reconnectStrategy === WebsocketReconnectStrategy.MIGRATE;
const performingRejoinReconnect =
Expand Down Expand Up @@ -1019,6 +1009,15 @@ export class Call {
this.state.setMembers(joinResponse.members);
this.state.setOwnCapabilities(joinResponse.own_capabilities);

if (data?.ring && !this.ringing) {
this.ringingSubject.next(true);
}

if (this.ringing && !this.isCreatedByMe) {
// signals other users that I have accepted the incoming call.
await this.accept();
}

if (this.streamClient._hasConnectionID()) {
this.watching = true;
this.clientStore.registerCall(this);
Expand Down

0 comments on commit 9e47834

Please sign in to comment.