From 6d4b37f96d9524a9e93a5746eb305c4db3e40936 Mon Sep 17 00:00:00 2001 From: GigiaJ Date: Tue, 22 Apr 2025 05:35:13 -0400 Subject: [PATCH] add call status bar call room link --- src/app/pages/call/CallNavBottom.tsx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/app/pages/call/CallNavBottom.tsx b/src/app/pages/call/CallNavBottom.tsx index 234649ea..79e7e7a0 100644 --- a/src/app/pages/call/CallNavBottom.tsx +++ b/src/app/pages/call/CallNavBottom.tsx @@ -1,7 +1,12 @@ import { logger } from 'matrix-js-sdk/lib/logger'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { useCallState } from '../client/CallProvider'; -import { Box, Icon, IconButton, Icons, Text } from 'folds'; +import { Box, Chip, Icon, IconButton, Icons, Text } from 'folds'; +import { useMentionClickHandler } from '../../hooks/useMentionClickHandler'; +import { + makeMentionCustomProps, + renderMatrixMention, +} from '../../plugins/react-custom-html-parser'; export function CallNavBottom() { const { @@ -25,6 +30,8 @@ export function CallNavBottom() { .catch((err) => logger.error(`FixedBottomNavArea: Failed action '${action}':`, err)); }; + const mentionClickHandler = useMentionClickHandler(activeCallRoomId ?? mx.getUserId()); + if (!activeCallRoomId) { return ( + + + {renderMatrixMention( + mx, + undefined, + test, + makeMentionCustomProps( + mentionClickHandler, + mx.getRoom(activeCallRoomId)?.normalizedName + ) + )} + + - {mx.getRoom(activeCallRoomId)?.normalizedName} ); }