Merge pull request #1158 from vector-im/dbkr/displayname

Fix username / displayname naming confusion
This commit is contained in:
David Baker 2023-06-27 13:14:09 +01:00 committed by GitHub
commit 2a819b95e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -18,7 +18,7 @@ export type LiveKitConfig = {
sfuUrl: string;
jwtUrl: string;
roomName: string;
userName: string;
userDisplayName: string;
userIdentity: string;
};
@ -29,11 +29,11 @@ export function useLiveKit(
const tokenOptions = React.useMemo(
() => ({
userInfo: {
name: config.userName,
name: config.userDisplayName,
identity: config.userIdentity,
},
}),
[config.userName, config.userIdentity]
[config.userDisplayName, config.userIdentity]
);
const token = useToken(config.jwtUrl, config.roomName, tokenOptions);

View File

@ -85,7 +85,7 @@ export function GroupCallView({
const roomAvatarUrl = useRoomAvatar(groupCall.room);
const matrixInfo: MatrixInfo = {
userName: displayName,
displayName,
avatarUrl,
roomName: groupCall.room.name,
roomIdOrAlias,

View File

@ -96,7 +96,7 @@ export function ActiveCall(props: ActiveCallProps) {
sfuUrl: Config.get().livekit!.server_url,
jwtUrl: `${Config.get().livekit!.jwt_service_url}/token`,
roomName: props.matrixInfo.roomName,
userName: props.matrixInfo.userName,
userDisplayName: props.matrixInfo.displayName,
userIdentity: `${props.client.getUserId()}:${props.client.getDeviceId()}`,
});

View File

@ -31,7 +31,7 @@ import { DeviceChoices, UserChoices } from "../livekit/useLiveKit";
import { useDefaultDevices } from "../settings/useSetting";
export type MatrixInfo = {
userName: string;
displayName: string;
avatarUrl: string;
roomName: string;
roomIdOrAlias: string;
@ -145,7 +145,7 @@ export function VideoPreview({ matrixInfo, onUserChoicesChanged }: Props) {
<Avatar
size={(previewBounds.height - 66) / 2}
src={matrixInfo.avatarUrl}
fallback={matrixInfo.userName.slice(0, 1).toUpperCase()}
fallback={matrixInfo.displayName.slice(0, 1).toUpperCase()}
/>
</div>
)}