@@ -191,6 +191,7 @@ export function setProfile(
191191 config : ParticipantProfileExtended ,
192192 setAnonymousProfile = false ,
193193 profileType : ProfileType = ProfileType . ANONYMOUS_ANIMAL ,
194+ showParticipantNumber = false ,
194195) {
195196 const generateProfileFromSet = (
196197 profileSet : { name : string ; avatar : string } [ ] ,
@@ -229,6 +230,13 @@ export function setProfile(
229230 const profileNature = generateProfileFromSet ( PROFILE_SET_NATURE ) ;
230231 const profileAnonymousParticipant = generateAnonymousParticipantProfile ( ) ;
231232
233+ // Append random numerics to profile names (e.g., "Bear123" instead of "Bear")
234+ if ( showParticipantNumber ) {
235+ profileAnimal1 . name = `${ profileAnimal1 . name } ${ randomNumber } ` ;
236+ profileAnimal2 . name = `${ profileAnimal2 . name } ${ randomNumber } ` ;
237+ profileNature . name = `${ profileNature . name } ${ randomNumber } ` ;
238+ }
239+
232240 config . anonymousProfiles [ PROFILE_SET_ANIMALS_1_ID ] = profileAnimal1 ;
233241 config . anonymousProfiles [ PROFILE_SET_ANIMALS_2_ID ] = profileAnimal2 ;
234242 config . anonymousProfiles [ PROFILE_SET_NATURE_ID ] = profileNature ;
@@ -259,7 +267,12 @@ export function setProfile(
259267 config . avatar = participantProfile . avatar ;
260268 } else if ( profileType === ProfileType . ANONYMOUS_ANIMAL ) {
261269 // Use animal profile (default)
262- config . name = `${ mainProfile . name } ${ mainProfile . repeat === 0 ? '' : ` ${ mainProfile . repeat + 1 } ` } ` ;
270+ if ( showParticipantNumber ) {
271+ // Name already has numeric suffix (e.g., "Bear1234")
272+ config . name = mainProfile . name ;
273+ } else {
274+ config . name = `${ mainProfile . name } ${ mainProfile . repeat === 0 ? '' : ` ${ mainProfile . repeat + 1 } ` } ` ;
275+ }
263276 config . avatar = mainProfile . avatar ;
264277 }
265278 // Note: ProfileType.DEFAULT should not reach here as setAnonymousProfile would be false
0 commit comments