mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Merge pull request #1158 from vector-im/dbkr/displayname
Fix username / displayname naming confusion
This commit is contained in:
commit
2a819b95e2
@ -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);
|
||||
|
||||
|
@ -85,7 +85,7 @@ export function GroupCallView({
|
||||
const roomAvatarUrl = useRoomAvatar(groupCall.room);
|
||||
|
||||
const matrixInfo: MatrixInfo = {
|
||||
userName: displayName,
|
||||
displayName,
|
||||
avatarUrl,
|
||||
roomName: groupCall.room.name,
|
||||
roomIdOrAlias,
|
||||
|
@ -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()}`,
|
||||
});
|
||||
|
||||
|
@ -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>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user