Merge pull request #5455 from matrix-org/dbkr/answered_elsewhere

Only show 'answered elsewhere' if we tried to answer too
This commit is contained in:
David Baker 2020-11-30 16:20:35 +00:00 committed by GitHub
commit 9f42d3e549
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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