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
This commit is contained in:
David Baker 2020-11-30 15:17:20 +00:00
parent d4ed4a135c
commit 3a3775b523

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."),