Make unknown failures more helpful.
This commit is contained in:
parent
18490377f8
commit
2bfad52b40
3 changed files with 6 additions and 6 deletions
|
@ -145,15 +145,15 @@ function textForCallHangupEvent(event) {
|
|||
const eventContent = event.getContent();
|
||||
let reason = "";
|
||||
if(!MatrixClientPeg.get().supportsVoip()) {
|
||||
reason = '(not supported by this browser)';
|
||||
reason = _t('(not supported by this browser)');
|
||||
} else if(eventContent.reason) {
|
||||
if (eventContent.reason === "ice_failed") {
|
||||
reason = "(call failed to connect)";
|
||||
reason = _t('(call failed to connect)');
|
||||
} else {
|
||||
reason = `(${eventContent.reason})`;
|
||||
reason = _t('(unknown failure: %(reason)s)', {reason: eventContent.reason});
|
||||
}
|
||||
}
|
||||
return _t('%(senderName)s ended the call.', {senderName}) + ' ' + _t(reason);
|
||||
return _t('%(senderName)s ended the call.', {senderName}) + ' ' + reason;
|
||||
}
|
||||
|
||||
function textForCallInviteEvent(event) {
|
||||
|
|
|
@ -638,7 +638,7 @@
|
|||
"VoIP conference started.": "VoIP conference started.",
|
||||
"VoIP is unsupported": "VoIP is unsupported",
|
||||
"(call failed to connect)": "(call failed to connect)",
|
||||
"(unknown failure)": "(unknown failure)",
|
||||
"(unknown failure: %(reason)s)": "(unknown failure: %(reason)s)",
|
||||
"(warning: cannot be disabled again!)": "(warning: cannot be disabled again!)",
|
||||
"Warning!": "Warning!",
|
||||
"WARNING: Device already verified, but keys do NOT MATCH!": "WARNING: Device already verified, but keys do NOT MATCH!",
|
||||
|
|
|
@ -577,7 +577,7 @@
|
|||
"VoIP conference started.": "VoIP conference started.",
|
||||
"VoIP is unsupported": "VoIP is unsupported",
|
||||
"(call failed to connect)": "(call failed to connect)",
|
||||
"(unknown failure)": "(unknown failure)",
|
||||
"(unknown failure: %(reason)s)": "(unknown failure: %(reason)s)",
|
||||
"(warning: cannot be disabled again!)": "(warning: cannot be disabled again!)",
|
||||
"Warning!": "Warning!",
|
||||
"WARNING: Device already verified, but keys do NOT MATCH!": "WARNING: Device already verified, but keys do NOT MATCH!",
|
||||
|
|
Loading…
Reference in a new issue