Don't show modal on reject/user hangup
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
92a60497d2
commit
78f53b3f6b
1 changed files with 5 additions and 1 deletions
|
@ -509,13 +509,17 @@ export default class CallHandler extends EventEmitter {
|
||||||
this.removeCallForRoom(mappedRoomId);
|
this.removeCallForRoom(mappedRoomId);
|
||||||
if (oldState === CallState.InviteSent && call.hangupParty === CallParty.Remote) {
|
if (oldState === CallState.InviteSent && call.hangupParty === CallParty.Remote) {
|
||||||
this.play(AudioID.Busy);
|
this.play(AudioID.Busy);
|
||||||
|
|
||||||
|
// Don't show a modal when we got rejected/the call was hung up
|
||||||
|
if (!hangupReason || [CallErrorCode.UserHangup, "user hangup"].includes(hangupReason)) return;
|
||||||
|
|
||||||
let title;
|
let title;
|
||||||
let description;
|
let description;
|
||||||
// TODO: We should either do away with these or figure out a copy for each code (expect user_hangup...)
|
// TODO: We should either do away with these or figure out a copy for each code (expect user_hangup...)
|
||||||
if (call.hangupReason === CallErrorCode.UserBusy) {
|
if (call.hangupReason === CallErrorCode.UserBusy) {
|
||||||
title = _t("User Busy");
|
title = _t("User Busy");
|
||||||
description = _t("The user you called is busy.");
|
description = _t("The user you called is busy.");
|
||||||
} else if (hangupReason && ![CallErrorCode.UserHangup, "user hangup"].includes(hangupReason)) {
|
} else {
|
||||||
title = _t("Call Failed");
|
title = _t("Call Failed");
|
||||||
description = _t("The call could not be established");
|
description = _t("The call could not be established");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue