diff --git a/src/components/structures/CallEventGrouper.ts b/src/components/structures/CallEventGrouper.ts index 861c978bb0..2b18a4316c 100644 --- a/src/components/structures/CallEventGrouper.ts +++ b/src/components/structures/CallEventGrouper.ts @@ -86,7 +86,7 @@ export default class CallEventGrouper extends EventEmitter { return Boolean(this.reject); } - public get length(): Date { + public get duration(): Date { if (!this.hangup || !this.selectAnswer) return; return new Date(this.hangup.getDate().getTime() - this.selectAnswer.getDate().getTime()); } diff --git a/src/components/views/messages/CallEvent.tsx b/src/components/views/messages/CallEvent.tsx index 107832bfc2..bc868c35b3 100644 --- a/src/components/views/messages/CallEvent.tsx +++ b/src/components/views/messages/CallEvent.tsx @@ -132,10 +132,10 @@ export default class CallEvent extends React.Component { // 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 length = this.props.callEventGrouper.length; + const duration = this.props.callEventGrouper.duration; let text = _t("Call ended"); - if (length) { - text += " • " + formatCallTime(length); + if (duration) { + text += " • " + formatCallTime(duration); } return (