mirror of
https://github.com/RocketChat/Rocket.Chat.git
synced 2025-12-28 06:47:25 +00:00
fix: "Call Ended" SFX played when a call starts in a different tab (#37816)
This commit is contained in:
parent
cf4dfcdc58
commit
733c94b996
5
.changeset/loud-elephants-happen.md
Normal file
5
.changeset/loud-elephants-happen.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'@rocket.chat/media-signaling': patch
|
||||
---
|
||||
|
||||
Fixes an issue where the client would play the Call Ended sound effect when the user started calling someone on a different session
|
||||
@ -296,17 +296,22 @@ export class ClientMediaCall implements IClientMediaCall {
|
||||
this._flags = signal.flags || [];
|
||||
|
||||
this._transferredBy = signal.transferredBy || null;
|
||||
this.changeContact(signal.contact);
|
||||
|
||||
if (this._role === 'caller' && !this.acceptedLocally) {
|
||||
if (oldCall) {
|
||||
this.acceptedLocally = true;
|
||||
} else if (signal.self?.contractId && signal.self.contractId !== this.config.sessionId) {
|
||||
// Call from another session, must be flagged as ignored before any event is triggered
|
||||
this.config.logger?.log('Ignoring Outbound Call from a different session');
|
||||
this.contractState = 'ignored';
|
||||
} else if (AUTO_IGNORE_UNKNOWN_OUTBOUND_CALLS) {
|
||||
this.config.logger?.log('Ignoring Unknown Outbound Call');
|
||||
this.ignore();
|
||||
}
|
||||
}
|
||||
|
||||
this.changeContact(signal.contact);
|
||||
|
||||
// If the call is already flagged as over before the initialization, do not process anything other than filling in the basic information
|
||||
if (this.isOver()) {
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user