Merge remote-tracking branch 'upstream/develop' into feature/narrow-voip-tiles/18398

This commit is contained in:
Šimon Brandner 2021-08-13 10:30:21 +02:00
commit 39bb253d1f
No known key found for this signature in database
GPG key ID: 55C211A1226CB17D
142 changed files with 5796 additions and 1956 deletions

View file

@ -25,6 +25,7 @@ import { CallErrorCode, CallState } from 'matrix-js-sdk/src/webrtc/call';
import InfoTooltip, { InfoTooltipKind } from '../elements/InfoTooltip';
import classNames from 'classnames';
import AccessibleTooltipButton from '../elements/AccessibleTooltipButton';
import { formatCallTime } from "../../../DateUtils";
const MAX_NON_NARROW_WIDTH = 400 / 70 * 100;
@ -161,9 +162,14 @@ export default class CallEvent extends React.PureComponent<IProps, IState> {
// https://github.com/vector-im/riot-android/issues/2623
// Also the correct hangup code as of VoIP v1 (with underscore)
// Also, if we don't have a reason
const duration = this.props.callEventGrouper.duration;
let text = _t("Call ended");
if (duration) {
text += " • " + formatCallTime(duration);
}
return (
<div className="mx_CallEvent_content">
{ _t("Call ended") }
{ text }
</div>
);
} else if (hangupReason === CallErrorCode.InviteTimeout) {