fix(screenshare) use selector for getting screenshare owner display name (#11478)

This commit is contained in:
William Liang 2022-05-03 10:25:19 -04:00 committed by GitHub
parent 42632bd5fd
commit f2c3740108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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 });
}
/**