diff --git a/res/css/views/messages/_LegacyCallEvent.pcss b/res/css/views/messages/_LegacyCallEvent.pcss index 873f5d4b5b..8d0f5abbc3 100644 --- a/res/css/views/messages/_LegacyCallEvent.pcss +++ b/res/css/views/messages/_LegacyCallEvent.pcss @@ -160,6 +160,7 @@ limitations under the License. flex-wrap: wrap; align-items: center; color: $secondary-content; + font-size: $font-12px; gap: $spacing-12; /* See mx_IncomingLegacyCallToast_buttons */ margin-inline-start: 42px; /* avatar (32px) + mx_LegacyCallEvent_info_basic margin (10px) */ word-break: break-word; @@ -168,6 +169,7 @@ limitations under the License. .mx_LegacyCallEvent_content_button { @mixin LegacyCallButton; padding: 0 $spacing-12; + font-size: inherit; span::before { mask-size: 16px; diff --git a/src/components/structures/LegacyCallEventGrouper.ts b/src/components/structures/LegacyCallEventGrouper.ts index 44656d8565..4abd4d8d19 100644 --- a/src/components/structures/LegacyCallEventGrouper.ts +++ b/src/components/structures/LegacyCallEventGrouper.ts @@ -72,7 +72,7 @@ export function buildLegacyCallEventGroupers( export default class LegacyCallEventGrouper extends EventEmitter { private events: Set = new Set(); - private call: MatrixCall; + private call: MatrixCall | null = null; public state: CallState | CustomCallState; public constructor() { @@ -111,7 +111,7 @@ export default class LegacyCallEventGrouper extends EventEmitter { } public get hangupReason(): string | null { - return this.hangup?.getContent()?.reason; + return this.call?.hangupReason ?? this.hangup?.getContent()?.reason ?? null; } public get rejectParty(): string { diff --git a/src/components/views/messages/LegacyCallEvent.tsx b/src/components/views/messages/LegacyCallEvent.tsx index 622772d289..4678b1a2e0 100644 --- a/src/components/views/messages/LegacyCallEvent.tsx +++ b/src/components/views/messages/LegacyCallEvent.tsx @@ -191,6 +191,13 @@ export default class LegacyCallEvent extends React.PureComponent {this.props.timestamp} ); + } else if (hangupReason === CallErrorCode.AnsweredElsewhere) { + return ( +
+ {_t("Answered elsewhere")} + {this.props.timestamp} +
+ ); } let reason; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 0c98d92ca0..28ffae5656 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2351,6 +2351,7 @@ "Call declined": "Call declined", "Call back": "Call back", "No answer": "No answer", + "Answered elsewhere": "Answered elsewhere", "Could not connect media": "Could not connect media", "Connection failed": "Connection failed", "Their device couldn't start the camera or microphone": "Their device couldn't start the camera or microphone",