@@ -534,6 +534,32 @@ export class VideoConference extends BaseComponent {
534534
535535 const newParticipantName = participant . name . trim ( ) ;
536536
537+ if ( this . videoConfig . canUseDefaultAvatars ) {
538+ this . roomState . updateMyProperties ( {
539+ avatar : participant . avatar ,
540+ name : participant . name ,
541+ type : participant . type ,
542+ joinedMeeting : true ,
543+ } ) ;
544+
545+ localParticipant . publish ( {
546+ ...localParticipant . value ,
547+ avatar : participant . avatar ,
548+ name : participant . name ,
549+ } ) ;
550+
551+ participants . publish ( {
552+ ...participants . value ,
553+ [ participant . id ] : {
554+ ...participants . value [ participant . id ] ,
555+ avatar : participant . avatar ,
556+ name : participant . name ,
557+ } ,
558+ } ) ;
559+
560+ return ;
561+ }
562+
537563 localParticipant . publish ( {
538564 ...localParticipant . value ,
539565 name : newParticipantName ,
@@ -542,22 +568,11 @@ export class VideoConference extends BaseComponent {
542568 participants . publish ( {
543569 ...participants . value ,
544570 [ participant . id ] : {
545- ...localParticipant . value ,
571+ ...participants . value [ participant . id ] ,
546572 name : newParticipantName ,
547573 } ,
548574 } ) ;
549575
550- if ( this . videoConfig . canUseDefaultAvatars ) {
551- this . roomState . updateMyProperties ( {
552- avatar : participant . avatar ,
553- name : participant . name ,
554- type : participant . type ,
555- joinedMeeting : true ,
556- } ) ;
557-
558- return ;
559- }
560-
561576 this . roomState . updateMyProperties ( {
562577 name : participant . name ,
563578 type : participant . type ,
0 commit comments