Only show 'answered elsewhere' if we tried to answer too

and don't play the hangup tone

Fixes https://github.com/vector-im/element-web/issues/15735
pull/21833/head
David Baker 2020-11-30 15:17:20 +00:00
parent d4ed4a135c
commit 3a3775b523
1 changed files with 3 additions and 2 deletions

View File

@ -306,8 +306,9 @@ export default class CallHandler {
Modal.createTrackedDialog('Call Handler', 'Call Failed', ErrorDialog, {
title, description,
});
} else if (call.hangupReason === CallErrorCode.AnsweredElsewhere) {
this.play(AudioID.Busy);
} else if (
call.hangupReason === CallErrorCode.AnsweredElsewhere && oldState === CallState.Connecting
) {
Modal.createTrackedDialog('Call Handler', 'Call Failed', ErrorDialog, {
title: _t("Answered Elsewhere"),
description: _t("The call was answered on another device."),