From f2c3740108b932b5f3f962bae115c9e04daa1a97 Mon Sep 17 00:00:00 2001 From: William Liang Date: Tue, 3 May 2022 10:25:19 -0400 Subject: [PATCH] fix(screenshare) use selector for getting screenshare owner display name (#11478) --- react/features/base/participants/functions.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/react/features/base/participants/functions.js b/react/features/base/participants/functions.js index 724619189..bffcbaec5 100644 --- a/react/features/base/participants/functions.js +++ b/react/features/base/participants/functions.js @@ -298,10 +298,9 @@ export function getParticipantDisplayName(stateful: Object | Function, id: strin * @returns {string} */ export function getScreenshareParticipantDisplayName(stateful: Object | Function, id: string) { - const owner = getParticipantById(stateful, getVirtualScreenshareParticipantOwnerId(id)); - const name = owner.name; + const ownerDisplayName = getParticipantDisplayName(stateful, getVirtualScreenshareParticipantOwnerId(id)); - return i18next.t('screenshareDisplayName', { name }); + return i18next.t('screenshareDisplayName', { name: ownerDisplayName }); } /**